]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
ifp may not be set, but ctx will be.
authorRoy Marples <roy@marples.name>
Tue, 8 Sep 2015 10:32:45 +0000 (10:32 +0000)
committerRoy Marples <roy@marples.name>
Tue, 8 Sep 2015 10:32:45 +0000 (10:32 +0000)
Makefile
if-bsd.c

index e4a25668790526f24c268241ee8935e943ed7398..cee2e3823266be50b28459effba9e2ad58e54329 100644 (file)
--- 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}
 
index 87d83efc9c95e7993f2aa96f780c339d5dccf9e7..8b8cfb6aba0d22035754d234a503c38ecc08fd6c 100644 (file)
--- 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;