]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: remove useless calls to afi2family 18624/head
authorLouis Scalbert <louis.scalbert@6wind.com>
Wed, 9 Apr 2025 11:06:36 +0000 (13:06 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Wed, 9 Apr 2025 11:07:56 +0000 (13:07 +0200)
Remove useless calls to afi2family(). str2prefix() always sets the
prefix family.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgp_route.c
bgpd/bgp_vty.c

index bb87406048b3ebf02456b64b60b6d5469e5e3227..a6f08341ab1f308d08403f224e9ce3bdedeb118a 100644 (file)
@@ -13325,8 +13325,6 @@ static int bgp_show_route_in_table(struct vty *vty, struct bgp *bgp, struct bgp_
                return CMD_WARNING;
        }
 
-       match.family = afi2family(afi);
-
        if (use_json)
                json = json_object_new_object();
 
@@ -16737,8 +16735,6 @@ static int bgp_clear_damp_route(struct vty *vty, const char *view_name,
                return CMD_WARNING;
        }
 
-       match.family = afi2family(afi);
-
        if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP)
            || (safi == SAFI_EVPN)) {
                for (dest = bgp_table_top(bgp->rib[AFI_IP][safi]); dest;
index 0b0ed79baf384e1b4aeaf25a770a97cd7558901f..b6fd9ecfd9807c8e3ac90fc23af684f58cc106d3 100644 (file)
@@ -11080,7 +11080,6 @@ static int bgp_clear_prefix(struct vty *vty, const char *view_name,
                return CMD_WARNING;
        }
 
-       match.family = afi2family(afi);
        rib = bgp->rib[afi][safi];
 
        if (safi == SAFI_MPLS_VPN) {