]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix indentation problem in bgp_recalculate_afi_safi_bestpaths
authorDonald Sharp <sharpd@nvidia.com>
Wed, 6 Mar 2024 20:03:31 +0000 (15:03 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 1 Apr 2024 14:24:14 +0000 (10:24 -0400)
This is seriously indented.  Let's make it a bit better.

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

index d98df754ef81187eb953f9cdb7f8c9a16c06b9b9..052267492b4c26df1115d7c93ce2bcdab233b327 100644 (file)
@@ -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);
        }
 }