From: Donald Sharp Date: Mon, 11 Sep 2017 17:13:17 +0000 (-0400) Subject: zebra: Fixup indentation X-Git-Tag: frr-4.0-dev~320^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=407c87a6c3b3282331b708a71a4392ac7d2aace4;p=mirror%2Ffrr.git zebra: Fixup indentation 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 --- diff --git a/zebra/redistribute.c b/zebra/redistribute.c index ce86b6c1e3..93bfc0c031 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -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); } diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 273945778a..e3ce414127 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -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); diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c index 4d6ba566ca..9ac24c53ed 100644 --- a/zebra/zebra_snmp.c +++ b/zebra/zebra_snmp.c @@ -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 */ diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 0a26ac6ad7..62c7d020bc 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -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);