diff options
| author | Mark Stapp <mjs@cisco.com> | 2025-03-26 14:54:30 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@cisco.com> | 2025-04-08 14:41:27 -0400 |
| commit | 7c98a27f3e53d543284c89d7518ba3b0d77278d4 (patch) | |
| tree | ce5b8fcc1e3673d9bf2b50492f2ca82ab747537a /zebra/interface.c | |
| parent | a2acd59afd4a611a214f68b255861f6f2753a51f (diff) | |
zebra: clean up -Wshadow compiler warnings
Clean up variable-shadowing compiler warnings.
Signed-off-by: Mark Stapp <mjs@cisco.com>
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index fd1ea380a5..f836b3ab35 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1919,8 +1919,7 @@ static void zebra_if_dplane_ifp_handling(struct zebra_dplane_ctx *ctx) if (zif_type == ZEBRA_IF_VRF && !vrf_is_backend_netns()) interface_vrf_change(op, ifindex, name, tableid, ns_id); } else { - ifindex_t master_ifindex, bridge_ifindex, bond_ifindex, - link_ifindex; + ifindex_t master_ifindex, bridge_ifindex, link_ifindex; enum zebra_slave_iftype zif_slave_type; uint8_t bypass; uint64_t flags; @@ -2730,14 +2729,14 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp) } if (gre_info->ifindex_link && (gre_info->link_nsid != NS_UNKNOWN)) { - struct interface *ifp; + struct interface *nifp; - ifp = if_lookup_by_index_per_ns( - zebra_ns_lookup(gre_info->link_nsid), - gre_info->ifindex_link); + nifp = if_lookup_by_index_per_ns( + zebra_ns_lookup(gre_info->link_nsid), + gre_info->ifindex_link); vty_out(vty, " Link Interface %s\n", - ifp == NULL ? "Unknown" : - ifp->name); + nifp == NULL ? "Unknown" : + nifp->name); } } @@ -3116,14 +3115,13 @@ static void if_dump_vty_json(struct vty *vty, struct interface *ifp, } if (gre_info->ifindex_link && (gre_info->link_nsid != NS_UNKNOWN)) { - struct interface *ifp; + struct interface *nifp; - ifp = if_lookup_by_index_per_ns( + nifp = if_lookup_by_index_per_ns( zebra_ns_lookup(gre_info->link_nsid), gre_info->ifindex_link); json_object_string_add(json_if, "linkInterface", - ifp == NULL ? "Unknown" - : ifp->name); + nifp == NULL ? "Unknown" : nifp->name); } } |
