From: Roy Marples Date: Tue, 8 Sep 2015 10:32:45 +0000 (+0000) Subject: ifp may not be set, but ctx will be. X-Git-Tag: v6.9.4~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8da0096ab3a77a8e8b5608ec1100ed4ed0a5db0c;p=thirdparty%2Fdhcpcd.git ifp may not be set, but ctx will be. --- diff --git a/Makefile b/Makefile index e4a25668..cee2e382 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ TOP?= . include ${TOP}/iconfig.mk CSTD?= c99 -CFLAGS+= -std=${CSTD} +CFLAGS+= -std=${CSTD} --analyze SRCS+= ${DHCPCD_SRCS} diff --git a/if-bsd.c b/if-bsd.c index 87d83efc..8b8cfb6a 100644 --- a/if-bsd.c +++ b/if-bsd.c @@ -1599,12 +1599,12 @@ _if_checkipv6(int s, struct dhcpcd_ctx *ctx, if (ra == -1) /* The sysctl probably doesn't exist, but this isn't an * error as such so just log it and continue */ - logger(ifp->ctx, errno == ENOENT ? LOG_DEBUG : LOG_WARNING, + logger(ctx, errno == ENOENT ? LOG_DEBUG : LOG_WARNING, "IPV6CTL_ACCEPT_RTADV: %m"); else if (ra != 0 && own) { - logger(ifp->ctx, LOG_DEBUG, "disabling Kernel IPv6 RA support"); + logger(ctx, LOG_DEBUG, "disabling Kernel IPv6 RA support"); if (set_inet6_sysctl(IPV6CTL_ACCEPT_RTADV, 0) == -1) { - logger(ifp->ctx, LOG_ERR, "IPV6CTL_ACCEPT_RTADV: %m"); + logger(ctx, LOG_ERR, "IPV6CTL_ACCEPT_RTADV: %m"); return ra; } ra = 0;