From a2addae8fe172f04f4d8ac99aa123a7d2dd64604 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 15 Sep 2017 12:47:35 -0300 Subject: *: use clang's 'ForEachMacros' format style option This fixes the broken indentation of several foreach loops throughout the code. From clang's documentation[1]: ForEachMacros: A vector of macros that should be interpreted as foreach loops instead of as function calls. [1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html Signed-off-by: Renato Westphal --- pimd/pim_zebra.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'pimd/pim_zebra.c') diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index a1107e2424..df70e9dd5e 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -178,8 +178,7 @@ static int pim_zebra_if_state_up(int command, struct zclient *zclient, */ if (sscanf(ifp->name, "pimreg%d", &table_id) == 1) { struct vrf *vrf; - RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) - { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { if ((table_id == vrf->data.l.table_id) && (ifp->vrf_id != vrf->vrf_id)) { struct interface *master = if_lookup_by_name( @@ -401,8 +400,7 @@ static void scan_upstream_rpf_cache() struct vrf *vrf; struct pim_instance *pim; - RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) - { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { pim = vrf->info; if (!pim) continue; @@ -498,8 +496,7 @@ static void scan_upstream_rpf_cache() } /* for (qpim_upstream_list) */ } - RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) - { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { pim = vrf->info; if (!pim) continue; @@ -666,8 +663,7 @@ void pim_scan_oil(struct pim_instance *pim_matcher) qpim_scan_oil_last = pim_time_monotonic_sec(); ++qpim_scan_oil_events; - RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) - { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { pim = vrf->info; if (!pim) continue; @@ -870,8 +866,7 @@ void igmp_source_forward_reevaluate_all(void) struct vrf *vrf; struct pim_instance *pim; - RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) - { + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { pim = vrf->info; if (!pim) continue; -- cgit v1.2.3