]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fixup indentation
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Sep 2017 17:13:17 +0000 (13:13 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Sep 2017 17:35:23 +0000 (13:35 -0400)
RNODE_FOREACH_RE... function calls were not properly being
indented when we switched over to the new format.  Let's fix
this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/redistribute.c
zebra/zebra_mpls.c
zebra/zebra_snmp.c
zebra/zebra_vrf.c

index ce86b6c1e34b15e5782d2289db4822086227fb8c..93bfc0c031d3cdfff332657524e0195ac8e76ad0 100644 (file)
@@ -84,11 +84,13 @@ static void zebra_redistribute_default(struct zserv *client, vrf_id_t vrf_id)
                if (!rn)
                        continue;
 
-               RNODE_FOREACH_RE(rn, newre)
-               if (CHECK_FLAG(newre->flags, ZEBRA_FLAG_SELECTED)
-                   && newre->distance != DISTANCE_INFINITY)
-                       zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_ADD,
-                                                client, &rn->p, NULL, newre);
+               RNODE_FOREACH_RE(rn, newre) {
+                       if (CHECK_FLAG(newre->flags, ZEBRA_FLAG_SELECTED)
+                           && newre->distance != DISTANCE_INFINITY)
+                               zsend_redistribute_route(
+                                       ZEBRA_REDISTRIBUTE_ROUTE_ADD,
+                                       client, &rn->p, NULL, newre);
+               }
 
                route_unlock_node(rn);
        }
index 273945778a0413063c08f81b9db2110cf282af48..e3ce414127d77934ba2742bfd35dd027611bfa30 100644 (file)
@@ -2392,15 +2392,20 @@ void mpls_ldp_ftn_uninstall_all(struct zebra_vrf *zvrf, int afi)
 
        for (rn = route_top(table); rn; rn = route_next(rn)) {
                update = 0;
-               RNODE_FOREACH_RE(rn, re)
-               for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
-                       if (nexthop->nh_label_type == ZEBRA_LSP_LDP) {
+               RNODE_FOREACH_RE(rn, re) {
+                       for (nexthop = re->nexthop;
+                            nexthop;
+                            nexthop = nexthop->next) {
+                               if (nexthop->nh_label_type != ZEBRA_LSP_LDP)
+                                       continue;
+
                                nexthop_del_labels(nexthop);
                                SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
                                SET_FLAG(re->status,
                                         ROUTE_ENTRY_LABELS_CHANGED);
                                update = 1;
                        }
+               }
 
                if (update)
                        rib_queue_add(rn);
index 4d6ba566ca90868f051de103ba0b61cedaf577df..9ac24c53ed572d5312e89f7e9819ec6955f44916 100644 (file)
@@ -155,8 +155,9 @@ static u_char *ipFwNumber(struct variable *v, oid objid[], size_t *objid_len,
        /* Return number of routing entries. */
        result = 0;
        for (rn = route_top(table); rn; rn = route_next(rn))
-               RNODE_FOREACH_RE(rn, re)
-       result++;
+               RNODE_FOREACH_RE(rn, re) {
+                       result++;
+               }
 
        return (u_char *)&result;
 }
@@ -182,8 +183,9 @@ static u_char *ipCidrNumber(struct variable *v, oid objid[], size_t *objid_len,
        /* Return number of routing entries. */
        result = 0;
        for (rn = route_top(table); rn; rn = route_next(rn))
-               RNODE_FOREACH_RE(rn, re)
-       result++;
+               RNODE_FOREACH_RE(rn, re) {
+                       result++;
+               }
 
        return (u_char *)&result;
 }
@@ -388,8 +390,9 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
 
                /* Check destination first */
                if (in_addr_cmp(&np2->p.u.prefix, (u_char *)&dest) > 0)
-                       RNODE_FOREACH_RE(np2, re2)
-               check_replace(np2, re2, np, re);
+                       RNODE_FOREACH_RE(np2, re2) {
+                               check_replace(np2, re2, np, re);
+                       }
 
                if (in_addr_cmp(&np2->p.u.prefix, (u_char *)&dest)
                    == 0) { /* have to look at each re individually */
index 0a26ac6ad79d5ade6c4dd76f364159fa12a27606..62c7d020bc2a239adb6d2dad514ec47133bcf45f 100644 (file)
@@ -290,8 +290,9 @@ static void zebra_rtable_node_cleanup(struct route_table *table,
 {
        struct route_entry *re, *next;
 
-       RNODE_FOREACH_RE_SAFE(node, re, next)
-       rib_unlink(node, re);
+       RNODE_FOREACH_RE_SAFE(node, re, next) {
+               rib_unlink(node, re);
+       }
 
        if (node->info)
                XFREE(MTYPE_RIB_DEST, node->info);