mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-15 09:42:36 +00:00
resolve issue found by cppcheck
[zebra/zebra_vxlan.c:5779] -> [zebra/zebra_vxlan.c:5778]: (warning) Either the condition 'if(svi_if_zif&&svi_if_link)' is redundant or there is possible null pointer dereference: svi_if_zif. Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
This commit is contained in:
parent
0742ce0a86
commit
e3bb770c4f
@ -5774,10 +5774,12 @@ int zebra_vxlan_add_del_gw_macip(struct interface *ifp, struct prefix *p,
|
||||
NULL; /* link info for the SVI = bridge info */
|
||||
|
||||
svi_if_zif = ifp->info;
|
||||
svi_if_link = if_lookup_by_index_per_ns(
|
||||
zebra_ns_lookup(NS_DEFAULT), svi_if_zif->link_ifindex);
|
||||
if (svi_if_zif && svi_if_link)
|
||||
zvni = zvni_from_svi(ifp, svi_if_link);
|
||||
if (svi_if_zif) {
|
||||
svi_if_link = if_lookup_by_index_per_ns(
|
||||
zebra_ns_lookup(NS_DEFAULT), svi_if_zif->link_ifindex);
|
||||
if (svi_if_link)
|
||||
zvni = zvni_from_svi(ifp, svi_if_link);
|
||||
}
|
||||
} else if (IS_ZEBRA_IF_BRIDGE(ifp)) {
|
||||
zvni = zvni_from_svi(ifp, ifp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user