]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: In bgp_withdraw attempt to avoid a if statement on every pass
authorDonald Sharp <sharpd@nvidia.com>
Thu, 7 Nov 2024 16:31:59 +0000 (11:31 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 7 Nov 2024 16:57:34 +0000 (11:57 -0500)
commitea4823964c46f9537c89287439aec24816b27592
tree088c56cb017ba6b8669f70a681adc370513e05fa
parent16bb31595793c0d6dd81ff104932d52c4411f7d8
bgpd: In bgp_withdraw attempt to avoid a if statement on every pass

We have this:

if ( (safi == SAFI_UNICAST) && ...)
    do stuff
if ( (safi == SAFI_MPLS_VPN) && ... )
    do stuff

this leads to having to test safi multiple times if safi is
SAFI_UNICAST.  Let's make it a else if as that we know that
the safi is going to not change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_route.c