mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 23:29:36 +00:00
Merge pull request #2601 from pacovn/PVS-Studio_scope_overlap
ripngd: variable scope overlap fix (PVS-Studio)
This commit is contained in:
commit
a566aa95b3
@ -492,7 +492,7 @@ static int ripng_enable_network_lookup_if(struct interface *ifp)
|
|||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
|
for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
|
||||||
struct prefix *p;
|
struct prefix *p;
|
||||||
struct route_node *node;
|
struct route_node *n;
|
||||||
|
|
||||||
p = connected->address;
|
p = connected->address;
|
||||||
|
|
||||||
@ -501,10 +501,10 @@ static int ripng_enable_network_lookup_if(struct interface *ifp)
|
|||||||
address.prefix = p->u.prefix6;
|
address.prefix = p->u.prefix6;
|
||||||
address.prefixlen = IPV6_MAX_BITLEN;
|
address.prefixlen = IPV6_MAX_BITLEN;
|
||||||
|
|
||||||
node = route_node_match(ripng_enable_network,
|
n = route_node_match(ripng_enable_network,
|
||||||
(struct prefix *)&address);
|
(struct prefix *)&address);
|
||||||
if (node) {
|
if (n) {
|
||||||
route_unlock_node(node);
|
route_unlock_node(n);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user