From: Donald Sharp Date: Wed, 6 Mar 2024 20:03:31 +0000 (-0500) Subject: bgpd: Fix indentation problem in bgp_recalculate_afi_safi_bestpaths X-Git-Tag: base_10.1~179^2~7 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1389316cf751ecad5bca106d8b54e0bae4737585;p=matthieu%2Ffrr.git bgpd: Fix indentation problem in bgp_recalculate_afi_safi_bestpaths This is seriously indented. Let's make it a bit better. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index d98df754ef..052267492b 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1858,17 +1858,19 @@ void bgp_recalculate_afi_safi_bestpaths(struct bgp *bgp, afi_t afi, safi_t safi) for (dest = bgp_table_top(bgp->rib[afi][safi]); dest; dest = bgp_route_next(dest)) { table = bgp_dest_get_bgp_table_info(dest); - if (table != NULL) { - /* Special handling for 2-level routing - * tables. */ - if (safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP - || safi == SAFI_EVPN) { - for (ndest = bgp_table_top(table); ndest; - ndest = bgp_route_next(ndest)) - bgp_process(bgp, ndest, afi, safi); - } else - bgp_process(bgp, dest, afi, safi); - } + + if (!table) + continue; + + /* Special handling for 2-level routing + * tables. */ + if (safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP + || safi == SAFI_EVPN) { + for (ndest = bgp_table_top(table); ndest; + ndest = bgp_route_next(ndest)) + bgp_process(bgp, ndest, afi, safi); + } else + bgp_process(bgp, dest, afi, safi); } }