]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a bogus clang analyzer warning on BSD by moving an assignment slightly higher up.
authorRoy Marples <roy@marples.name>
Fri, 6 May 2016 20:09:09 +0000 (20:09 +0000)
committerRoy Marples <roy@marples.name>
Fri, 6 May 2016 20:09:09 +0000 (20:09 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index 520ddcf31ab7c202e227d8917d809444b6ab5172..a22f2e11a2aa35631fec9cc0c2c405d3386c65de 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -1208,8 +1208,8 @@ ipv6_addlinklocal(struct interface *ifp)
        if (ap == NULL)
                return -1;
 
+       dadcounter = 0;
        if (ifp->options->options & DHCPCD_SLAACPRIVATE) {
-               dadcounter = 0;
 nextslaacprivate:
                if (ipv6_makestableprivate(&ap->addr,
                        &ap->prefix, ap->prefix_len, ifp, &dadcounter) == -1)