From: Roy Marples Date: Mon, 5 Sep 2016 19:43:14 +0000 (+0000) Subject: Only callback when there is a callback. X-Git-Tag: v6.11.4~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59d050bda81bb042a5044b6f64abb4391b686c4c;p=thirdparty%2Fdhcpcd.git Only callback when there is a callback. --- diff --git a/if-linux.c b/if-linux.c index 88a38981..11a8c5fb 100644 --- a/if-linux.c +++ b/if-linux.c @@ -363,7 +363,7 @@ get_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, int fd, int flags, } if (nlm->nlmsg_type == NLMSG_DONE) break; - if ((r = callback(ctx, ifp, nlm)) != 0) + if (callback && (r = callback(ctx, ifp, nlm)) != 0) break; }