]> git.proxmox.com Git - mirror_frr.git/commitdiff
ripngd: variable scope overlap fix (PVS-Studio)
authorF. Aragon <paco@voltanet.io>
Mon, 2 Jul 2018 14:53:16 +0000 (16:53 +0200)
committerF. Aragon <paco@voltanet.io>
Mon, 2 Jul 2018 14:53:16 +0000 (16:53 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
ripngd/ripng_interface.c

index d1057bf53e219eb715f01bcac5b665ca0802ee67..c463630b12964c4000e8e9479b6002eda67a0709 100644 (file)
@@ -492,7 +492,7 @@ static int ripng_enable_network_lookup_if(struct interface *ifp)
 
        for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
                struct prefix *p;
-               struct route_node *node;
+               struct route_node *n;
 
                p = connected->address;
 
@@ -501,10 +501,10 @@ static int ripng_enable_network_lookup_if(struct interface *ifp)
                        address.prefix = p->u.prefix6;
                        address.prefixlen = IPV6_MAX_BITLEN;
 
-                       node = route_node_match(ripng_enable_network,
-                                               (struct prefix *)&address);
-                       if (node) {
-                               route_unlock_node(node);
+                       n = route_node_match(ripng_enable_network,
+                                            (struct prefix *)&address);
+                       if (n) {
+                               route_unlock_node(n);
                                return 1;
                        }
                }