diff --git a/src/plugins/abf/abf_itf_attach.c b/src/plugins/abf/abf_itf_attach.c
index 337eed8..4f17f72 100644
--- a/src/plugins/abf/abf_itf_attach.c
+++ b/src/plugins/abf/abf_itf_attach.c
@@ -472,11 +472,11 @@
   u32 aii;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(aii, abf_itf_attach_pool,
-  ({
+  pool_foreach_index (aii, abf_itf_attach_pool)
+   {
     if (!cb(aii, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/abf/abf_policy.c b/src/plugins/abf/abf_policy.c
index 8defa75..945434b 100644
--- a/src/plugins/abf/abf_policy.c
+++ b/src/plugins/abf/abf_policy.c
@@ -346,11 +346,11 @@
   u32 api;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(api, abf_policy_pool,
-  ({
+  pool_foreach_index (api, abf_policy_pool)
+   {
     if (!cb(api, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -375,10 +375,10 @@
   if (INDEX_INVALID == policy_id)
     {
       /* *INDENT-OFF* */
-      pool_foreach(ap, abf_policy_pool,
-      ({
+      pool_foreach (ap, abf_policy_pool)
+       {
         vlib_cli_output(vm, "%U", format_abf, ap);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index b18e851..05251c6 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -1965,10 +1965,10 @@
     {
     /* *INDENT-OFF* */
     /* Just dump all ACLs */
-    pool_foreach (acl, am->acls,
-    ({
+    pool_foreach (acl, am->acls)
+     {
       send_acl_details(am, reg, acl, mp->context);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
@@ -2050,10 +2050,10 @@
   if (mp->sw_if_index == ~0)
     {
     /* *INDENT-OFF* */
-    pool_foreach (swif, im->sw_interfaces,
-    ({
+    pool_foreach (swif, im->sw_interfaces)
+     {
       send_acl_interface_list_details(am, reg, swif->sw_if_index, mp->context);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
@@ -2215,10 +2215,10 @@
     {
       /* Just dump all ACLs for now, with sw_if_index = ~0 */
       /* *INDENT-OFF* */
-      pool_foreach (acl, am->macip_acls,
-        ({
+      pool_foreach (acl, am->macip_acls)
+         {
           send_macip_acl_details (am, reg, acl, mp->context);
-        }));
+        }
       /* *INDENT-ON* */
     }
   else
@@ -2424,10 +2424,10 @@
   if (mp->sw_if_index == ~0)
     {
     /* *INDENT-OFF* */
-    pool_foreach (swif, im->sw_interfaces,
-    ({
+    pool_foreach (swif, im->sw_interfaces)
+     {
       send_acl_interface_etype_whitelist_details(am, reg, swif->sw_if_index, mp->context);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
@@ -3268,8 +3268,8 @@
 	}
       vlib_cli_output (vm, "  connection add/del stats:", wk);
       /* *INDENT-OFF* */
-      pool_foreach (swif, im->sw_interfaces,
-        ({
+      pool_foreach (swif, im->sw_interfaces)
+         {
           u32 sw_if_index = swif->sw_if_index;
           u64 n_adds =
             (sw_if_index < vec_len (pw->fa_session_adds_by_sw_if_index) ?
@@ -3291,7 +3291,7 @@
                            n_adds -
                            n_dels,
                            n_epoch_changes);
-        }));
+        }
       /* *INDENT-ON* */
 
       vlib_cli_output (vm, "  connection timeout type lists:", wk);
diff --git a/src/plugins/acl/hash_lookup.c b/src/plugins/acl/hash_lookup.c
index 26ee5cb..85b54b3 100644
--- a/src/plugins/acl/hash_lookup.c
+++ b/src/plugins/acl/hash_lookup.c
@@ -262,11 +262,11 @@
 {
   ace_mask_type_entry_t *mte;
   /* *INDENT-OFF* */
-  pool_foreach(mte, am->ace_mask_type_pool,
-  ({
+  pool_foreach (mte, am->ace_mask_type_pool)
+   {
     if(memcmp(&mte->mask, mask, sizeof(*mask)) == 0)
       return (mte - am->ace_mask_type_pool);
-  }));
+  }
   /* *INDENT-ON* */
   return ~0;
 }
@@ -1160,13 +1160,13 @@
 
   vlib_cli_output (vm, "Mask-type entries:");
     /* *INDENT-OFF* */
-    pool_foreach(mte, am->ace_mask_type_pool,
-    ({
+    pool_foreach (mte, am->ace_mask_type_pool)
+     {
       vlib_cli_output(vm, "     %3d: %016llx %016llx %016llx %016llx %016llx %016llx  refcount %d",
 		    mte - am->ace_mask_type_pool,
 		    mte->mask.kv_40_8.key[0], mte->mask.kv_40_8.key[1], mte->mask.kv_40_8.key[2],
 		    mte->mask.kv_40_8.key[3], mte->mask.kv_40_8.key[4], mte->mask.kv_40_8.value, mte->refcount);
-    }));
+    }
     /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/acl/lookup_context.c b/src/plugins/acl/lookup_context.c
index ed9b2c7..8d1f3f2 100644
--- a/src/plugins/acl/lookup_context.c
+++ b/src/plugins/acl/lookup_context.c
@@ -37,12 +37,12 @@
 {
     acl_lookup_context_user_t *auser;
 
-    pool_foreach (auser, am->acl_users,
-    ({
+    pool_foreach (auser, am->acl_users)
+     {
       if (0 == strcmp(auser->user_module_name, user_module_name)) {
         return (auser - am->acl_users);
       }
-    }));
+    }
 
     pool_get(am->acl_users, auser);
     auser->user_module_name = user_module_name;
@@ -310,13 +310,13 @@
     vlib_main_t *vm = am->vlib_main;
     acl_lookup_context_user_t *auser;
 
-    pool_foreach (auser, am->acl_users,
-    ({
+    pool_foreach (auser, am->acl_users)
+     {
       u32 curr_user_index = (auser - am->acl_users);
       if (user_index == ~0 || (curr_user_index == user_index)) {
         vlib_cli_output (vm, "index %d:%s:%s:%s", curr_user_index, auser->user_module_name, auser->val1_label, auser->val2_label);
       }
-    }));
+    }
 }
 
 
@@ -333,8 +333,8 @@
     return;
   }
 
-  pool_foreach (acontext, am->acl_lookup_contexts,
-  ({
+  pool_foreach (acontext, am->acl_lookup_contexts)
+   {
     u32 curr_lc_index = (acontext - am->acl_lookup_contexts);
     if ((lc_index == ~0) || (curr_lc_index == lc_index)) {
       if (acl_user_id_valid(am, acontext->context_user_id)) {
@@ -350,7 +350,7 @@
                        format_vec32, acontext->acl_indices, "%d");
       }
     }
-  }));
+  }
 }
 
 void *
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index c6bf2df..ffd372d 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -1307,10 +1307,10 @@
        * during suspend */
       vec_reset_length (dev_pointers);
       /* *INDENT-OFF* */
-      pool_foreach_index (i, am->devices,
+      pool_foreach_index (i, am->devices)
         {
 	  vec_add1 (dev_pointers, avf_get_device (i));
-	});
+	}
 
       vec_foreach_index (i, dev_pointers)
         {
@@ -1519,7 +1519,7 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (adp, am->devices, ({
+  pool_foreach (adp, am->devices)  {
 	if ((*adp)->pci_addr.as_u32 == args->addr.as_u32)
       {
 	args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -1528,7 +1528,7 @@
 			     &args->addr, "pci address in use");
 	return;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_get (am->devices, adp);
diff --git a/src/plugins/builtinurl/builtins.c b/src/plugins/builtinurl/builtins.c
index 6b2b57b..04567c0 100644
--- a/src/plugins/builtinurl/builtins.c
+++ b/src/plugins/builtinurl/builtins.c
@@ -101,10 +101,10 @@
   else				/* default, HTTP_BUILTIN_METHOD_GET */
     {
       /* *INDENT-OFF* */
-      pool_foreach (hi, im->hw_interfaces,
-      ({
+      pool_foreach (hi, im->hw_interfaces)
+       {
         vec_add1 (sw_if_indices, hi->sw_if_index);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
@@ -156,12 +156,12 @@
 
   /* Construct vector of active hw_if_indexes ... */
   /* *INDENT-OFF* */
-  pool_foreach (hi, im->hw_interfaces,
-  ({
+  pool_foreach (hi, im->hw_interfaces)
+   {
     /* No point in mentioning "local0"... */
     if (hi - im->hw_interfaces)
       vec_add1 (hw_if_indices, hi - im->hw_interfaces);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Build answer */
diff --git a/src/plugins/cdp/cdp_input.c b/src/plugins/cdp/cdp_input.c
index e52361b..76a3d70 100644
--- a/src/plugins/cdp/cdp_input.c
+++ b/src/plugins/cdp/cdp_input.c
@@ -439,15 +439,15 @@
 	      "Our Port", "Peer System", "Peer Port", "Last Heard");
 
   /* *INDENT-OFF* */
-  pool_foreach (n, cm->neighbors,
-  ({
+  pool_foreach (n, cm->neighbors)
+   {
     hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index);
 
     if (n->disabled == 0)
       s = format (s, "%=25v %=25s %=25s %=10.1f\n",
                   hw->name, n->device_name, n->port_id,
                   n->last_heard);
-  }));
+  }
   /* *INDENT-ON* */
   return s;
 }
diff --git a/src/plugins/cdp/cdp_periodic.c b/src/plugins/cdp/cdp_periodic.c
index b0b33cf..c73d86b 100644
--- a/src/plugins/cdp/cdp_periodic.c
+++ b/src/plugins/cdp/cdp_periodic.c
@@ -358,10 +358,10 @@
   static cdp_neighbor_t **n_list = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (n, cm->neighbors,
-  ({
+  pool_foreach (n, cm->neighbors)
+   {
     vec_add1 (n_list, n);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Across all cdp neighbors known to the system */
diff --git a/src/plugins/cnat/cnat_client.c b/src/plugins/cnat/cnat_client.c
index 1074fcc..534813c 100644
--- a/src/plugins/cnat/cnat_client.c
+++ b/src/plugins/cnat/cnat_client.c
@@ -84,7 +84,7 @@
       vec_reset_length (del_vec);
       clib_spinlock_lock (&cnat_client_db.throttle_pool_lock[i]);
       /* *INDENT-OFF* */
-      pool_foreach(addr, cnat_client_db.throttle_pool[i], ({
+      pool_foreach (addr, cnat_client_db.throttle_pool[i])  {
 	cc = (AF_IP4 == addr->version ?
 	      cnat_client_ip4_find (&ip_addr_v4(addr)) :
 	      cnat_client_ip6_find (&ip_addr_v6(addr)));
@@ -94,7 +94,7 @@
 	    cnat_client_cnt_session (cc);
 	    vec_add1(del_vec, addr - cnat_client_db.throttle_pool[i]);
 	  }
-      }));
+      }
       /* *INDENT-ON* */
       vec_foreach (ai, del_vec)
       {
@@ -301,9 +301,8 @@
   if (INDEX_INVALID == cci)
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(cci, cnat_client_pool, ({
+      pool_foreach_index (cci, cnat_client_pool)
         vlib_cli_output(vm, "%U", format_cnat_client, cci, 0);
-      }))
       /* *INDENT-ON* */
 
       vlib_cli_output (vm, "%d clients", pool_elts (cnat_client_pool));
diff --git a/src/plugins/cnat/cnat_session.c b/src/plugins/cnat/cnat_session.c
index 54554ce..c3d8aa7 100644
--- a/src/plugins/cnat/cnat_session.c
+++ b/src/plugins/cnat/cnat_session.c
@@ -243,11 +243,11 @@
   cnat_timestamp_t *ts;
   clib_rwlock_reader_lock (&cnat_main.ts_lock);
     /* *INDENT-OFF* */
-  pool_foreach (ts, cnat_timestamps, ({
+  pool_foreach (ts, cnat_timestamps)  {
     vlib_cli_output (vm, "[%d] last_seen:%f lifetime:%u ref:%u",
 		     ts - cnat_timestamps,
 		     ts->last_seen, ts->lifetime, ts->refcnt);
-  }));
+  }
   /* *INDENT-ON* */
   clib_rwlock_reader_unlock (&cnat_main.ts_lock);
   return (NULL);
diff --git a/src/plugins/cnat/cnat_translation.c b/src/plugins/cnat/cnat_translation.c
index d519cd5..9a1cc8b 100644
--- a/src/plugins/cnat/cnat_translation.c
+++ b/src/plugins/cnat/cnat_translation.c
@@ -69,11 +69,11 @@
   addr_resolution_t *ar;
   index_t *indexes = 0, *ari;
   /* *INDENT-OFF* */
-  pool_foreach (ar, tr_resolutions, ({
+  pool_foreach (ar, tr_resolutions)  {
     if ((cti == INDEX_INVALID || ar->cti == cti) &&
       (ar->type == type || CNAT_RESOLV_ADDR_ANY == type))
       vec_add1(indexes, ar - tr_resolutions);
-  }));
+  }
   /* *INDENT-ON* */
   vec_foreach (ari, indexes) pool_put_index (tr_resolutions, *ari);
 
@@ -313,11 +313,11 @@
   u32 api;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(api, cnat_translation_pool,
-  ({
+  pool_foreach_index (api, cnat_translation_pool)
+   {
     if (!cb(api, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -381,11 +381,11 @@
   if (INDEX_INVALID == cti)
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(cti, cnat_translation_pool,
-      ({
+      pool_foreach_index (cti, cnat_translation_pool)
+       {
 	ct = pool_elt_at_index (cnat_translation_pool, cti);
         vlib_cli_output(vm, "%U", format_cnat_translation, ct);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -403,10 +403,10 @@
   index_t tri, *trp, *trs = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(tri, cnat_translation_pool,
-  ({
+  pool_foreach_index (tri, cnat_translation_pool)
+   {
     vec_add1(trs, tri);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (trp, trs) cnat_translation_delete (*trp);
@@ -649,13 +649,13 @@
 {
   addr_resolution_t *ar;
   /* *INDENT-OFF* */
-  pool_foreach (ar, tr_resolutions, ({
+  pool_foreach (ar, tr_resolutions)  {
     if (ar->sw_if_index != sw_if_index)
       continue;
     if (ar->af != ip_addr_version (address))
       continue;
     cnat_if_addr_add_cbs[ar->type] (ar, address, is_del);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/ct6/ct6.c b/src/plugins/ct6/ct6.c
index 15fa44a..d569a7c 100644
--- a/src/plugins/ct6/ct6.c
+++ b/src/plugins/ct6/ct6.c
@@ -322,10 +322,10 @@
 		0 /* pool */ , 0 /* header */ , verbose);
 
       /* *INDENT-OFF* */
-      pool_foreach (s0, cmp->sessions[i],
-      ({
+      pool_foreach (s0, cmp->sessions[i])
+       {
         s = format (s, "%U", format_ct6_session, cmp, i, s0, verbose);
-      }));
+      }
       /* *INDENT-ON* */
     }
   vlib_cli_output (cmp->vlib_main, "%v", s);
@@ -431,10 +431,10 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (s0, cmp->sessions[0],
-  ({
+  pool_foreach (s0, cmp->sessions[0])
+   {
     s = format (s, "%U", format_ct6_session, cmp, 0, s0, 1 /* verbose */);
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "\nEnd state: first index %d last index %d\n%v",
@@ -451,10 +451,10 @@
   ct6_update_session_hit (cmp, s0, 234.0);
 
   /* *INDENT-OFF* */
-  pool_foreach (s0, cmp->sessions[0],
-  ({
+  pool_foreach (s0, cmp->sessions[0])
+   {
     s = format (s, "%U", format_ct6_session, cmp, 0, s0, 1 /* verbose */);
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "\nEnd state: first index %d last index %d\n%v",
diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c
index 575f8b8..e15b6cb 100644
--- a/src/plugins/dhcp/client.c
+++ b/src/plugins/dhcp/client.c
@@ -867,13 +867,13 @@
 	    {
               /* *INDENT-OFF* */
               next_expire_time = 1e70;
-              pool_foreach (c, dcm->clients,
-              ({
+              pool_foreach (c, dcm->clients)
+               {
                 this_next_expire_time = dhcp_client_sm
                   (now, timeout, (uword) (c - dcm->clients));
                 next_expire_time = this_next_expire_time < next_expire_time ?
                   this_next_expire_time : next_expire_time;
-              }));
+              }
               if (next_expire_time > now)
                 timeout = next_expire_time - now;
               else
@@ -939,12 +939,12 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (c, dcm->clients,
-  ({
+  pool_foreach (c, dcm->clients)
+   {
     vlib_cli_output (vm, "%U",
                      format_dhcp_client, dcm,
                      c, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1114,11 +1114,11 @@
   dhcp_client_t *c;
 
   /* *INDENT-OFF* */
-  pool_foreach (c, dcm->clients,
-  ({
+  pool_foreach (c, dcm->clients)
+   {
     if (!cb(c, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 
 }
diff --git a/src/plugins/dhcp/dhcp6_client_common_dp.c b/src/plugins/dhcp/dhcp6_client_common_dp.c
index 2acd2f6..da6f61a 100644
--- a/src/plugins/dhcp/dhcp6_client_common_dp.c
+++ b/src/plugins/dhcp/dhcp6_client_common_dp.c
@@ -62,12 +62,12 @@
   ethernet_interface_t *eth_if = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (hi, im->hw_interfaces,
-  ({
+  pool_foreach (hi, im->hw_interfaces)
+   {
     eth_if = ethernet_get_interface (&ethernet_main, hi->hw_if_index);
     if (eth_if)
       break;
-  }));
+  }
   /* *INDENT-ON* */
 
   if (eth_if)
diff --git a/src/plugins/dhcp/dhcp6_ia_na_client_cp.c b/src/plugins/dhcp/dhcp6_ia_na_client_cp.c
index 975a7e0..edc6f49 100644
--- a/src/plugins/dhcp/dhcp6_ia_na_client_cp.c
+++ b/src/plugins/dhcp/dhcp6_ia_na_client_cp.c
@@ -273,8 +273,8 @@
 
       u8 address_already_present = 0;
       /* *INDENT-OFF* */
-      pool_foreach (address_info, rm->address_pool,
-      ({
+      pool_foreach (address_info, rm->address_pool)
+       {
         if (address_info->sw_if_index != sw_if_index)
           ;
         else if (!ip6_addresses_equal (&address_info->address, address))
@@ -284,7 +284,7 @@
             address_already_present = 1;
             goto address_pool_foreach_out;
           }
-      }));
+      }
       /* *INDENT-ON* */
     address_pool_foreach_out:
 
@@ -346,15 +346,15 @@
   address_info_t *address_info, *address_list = 0;;
 
   /* *INDENT-OFF* */
-  pool_foreach (address_info, rm->address_pool,
-  ({
+  pool_foreach (address_info, rm->address_pool)
+   {
     if (address_info->sw_if_index == sw_if_index)
       {
         u32 pos = vec_len (address_list);
         vec_validate (address_list, pos);
         clib_memcpy (&address_list[pos], address_info, sizeof (*address_info));
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return address_list;
@@ -395,8 +395,8 @@
 	{
 	  due_time = current_time + 1e9;
           /* *INDENT-OFF* */
-          pool_foreach (address_info, rm->address_pool,
-          ({
+          pool_foreach (address_info, rm->address_pool)
+           {
             if (address_info->due_time > current_time)
               {
                 if (address_info->due_time < due_time)
@@ -423,7 +423,7 @@
                                                     0, 1);
                   }
               }
-          }));
+          }
           /* *INDENT-ON* */
 	  for (i = 0; i < vec_len (rm->client_state_by_sw_if_index); i++)
 	    {
@@ -526,15 +526,15 @@
   f64 current_time = vlib_time_now (vm);
 
   /* *INDENT-OFF* */
-  pool_foreach (address_info, dm->address_pool,
-  ({
+  pool_foreach (address_info, dm->address_pool)
+   {
     vlib_cli_output (vm, "address: %U, "
                      "preferred lifetime: %u, valid lifetime: %u "
                      "(%f remaining)",
                      format_ip6_address, &address_info->address,
                      address_info->preferred_lt, address_info->valid_lt,
                      address_info->due_time - current_time);
-  }));
+  }
   /* *INDENT-ON* */
 
   return error;
@@ -661,8 +661,8 @@
 	}
 
       /* *INDENT-OFF* */
-      pool_foreach (address_info, rm->address_pool,
-      ({
+      pool_foreach (address_info, rm->address_pool)
+       {
         if (address_info->sw_if_index == sw_if_index)
           {
             ASSERT (sw_if_index < vec_len (rm->client_state_by_sw_if_index) &&
@@ -680,7 +680,7 @@
                 clib_warning ("Failed to delete interface address");
             pool_put (rm->address_pool, address_info);
           }
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/dhcp/dhcp6_pd_client_cp.c b/src/plugins/dhcp/dhcp6_pd_client_cp.c
index 2328dfd..f6d30fa 100644
--- a/src/plugins/dhcp/dhcp6_pd_client_cp.c
+++ b/src/plugins/dhcp/dhcp6_pd_client_cp.c
@@ -372,10 +372,10 @@
    * so collect active indices.
    */
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     vec_add1 (pm->indices, prefix_info - pm->prefix_pool);
-  }));
+  }
   /* *INDENT-ON* */
 
   for (i = 0; i < n_prefixes; i++)
@@ -481,8 +481,8 @@
   prefix_info_t *prefix_info, *prefix_list = 0;;
 
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     if (is_dhcpv6_pd_prefix (prefix_info) &&
         prefix_info->opaque_data == sw_if_index)
       {
@@ -490,7 +490,7 @@
         vec_validate (prefix_list, pos);
         clib_memcpy (&prefix_list[pos], prefix_info, sizeof (*prefix_info));
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return prefix_list;
@@ -531,8 +531,8 @@
 	{
 	  due_time = current_time + 1e9;
           /* *INDENT-OFF* */
-          pool_foreach (prefix_info, pm->prefix_pool,
-          ({
+          pool_foreach (prefix_info, pm->prefix_pool)
+           {
             if (is_dhcpv6_pd_prefix (prefix_info))
               {
                 if (prefix_info->due_time > current_time)
@@ -558,7 +558,7 @@
                       }
                   }
               }
-	  }));
+	  }
 	  /* *INDENT-ON* */
 	  for (i = 0; i < vec_len (rm->client_state_by_sw_if_index); i++)
 	    {
@@ -788,12 +788,12 @@
   prefix_info_t *prefix_info;
 
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     if (prefix_info->prefix_group_index == prefix_group_index &&
         prefix_info - pm->prefix_pool != ignore_prefix_index)
         return prefix_info - pm->prefix_pool;
-  }));
+  }
   /* *INDENT-ON* */
   return ~0;
 }
@@ -1139,8 +1139,8 @@
   f64 current_time = vlib_time_now (vm);
 
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     prefix_group =
       pm->prefix_group_name_by_index[prefix_info->prefix_group_index];
     vlib_cli_output (vm, "opaque_data: %lu, prefix: %U/%d, prefix group: %s, "
@@ -1151,7 +1151,7 @@
                      prefix_group,
                      prefix_info->preferred_lt, prefix_info->valid_lt,
                      prefix_info->due_time - current_time);
-  }));
+  }
   /* *INDENT-ON* */
 
   return error;
@@ -1305,8 +1305,8 @@
       vec_validate (prefix_list, 0);
 
       /* *INDENT-OFF* */
-      pool_foreach (prefix_info, pm->prefix_pool,
-      ({
+      pool_foreach (prefix_info, pm->prefix_pool)
+       {
         if (is_dhcpv6_pd_prefix (prefix_info) &&
             prefix_info->opaque_data == sw_if_index)
           {
@@ -1324,7 +1324,7 @@
             set_is_dhcpv6_pd_prefix (prefix_info, 0);
             pool_put (pm->prefix_pool, prefix_info);
           }
-      }));
+      }
       /* *INDENT-ON* */
 
       vec_free (prefix_list);
diff --git a/src/plugins/dhcp/dhcp_api.c b/src/plugins/dhcp/dhcp_api.c
index c5c7a82..2b8d41a 100644
--- a/src/plugins/dhcp/dhcp_api.c
+++ b/src/plugins/dhcp/dhcp_api.c
@@ -700,8 +700,8 @@
 
 	      vpe_client_registration_t *reg;
               /* *INDENT-OFF* */
-              pool_foreach(reg, vpe_api_main.dhcp6_reply_events_registrations,
-              ({
+              pool_foreach (reg, vpe_api_main.dhcp6_reply_events_registrations)
+               {
                 vl_api_registration_t *vl_reg;
                 vl_reg =
                   vl_api_client_index_to_registration (reg->client_index);
@@ -715,7 +715,7 @@
                     msg->pid = reg->client_pid;
                     vl_api_send_msg (vl_reg, (u8 *) msg);
                   }
-              }));
+              }
               /* *INDENT-ON* */
 
 	      clib_mem_free (event);
@@ -812,8 +812,8 @@
 
 	      vpe_client_registration_t *reg;
               /* *INDENT-OFF* */
-              pool_foreach(reg, vpe_api_main.dhcp6_pd_reply_events_registrations,
-              ({
+              pool_foreach (reg, vpe_api_main.dhcp6_pd_reply_events_registrations)
+               {
                 vl_api_registration_t *vl_reg;
                 vl_reg =
                   vl_api_client_index_to_registration (reg->client_index);
@@ -827,7 +827,7 @@
                     msg->pid = reg->client_pid;
                     vl_api_send_msg (vl_reg, (u8 *) msg);
                   }
-              }));
+              }
               /* *INDENT-ON* */
 
 	      clib_mem_free (event);
diff --git a/src/plugins/dns/dns.c b/src/plugins/dns/dns.c
index d045ca0..b4830e4 100644
--- a/src/plugins/dns/dns.c
+++ b/src/plugins/dns/dns.c
@@ -52,11 +52,11 @@
   dns_cache_lock (dm, 1);
 
   /* *INDENT-OFF* */
-  pool_foreach (ep, dm->entries,
-  ({
+  pool_foreach (ep, dm->entries)
+   {
     vec_free (ep->name);
     vec_free (ep->pending_requests);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (dm->entries);
@@ -2157,8 +2157,8 @@
   if (verbose > 0)
     {
       /* *INDENT-OFF* */
-      pool_foreach (ep, dm->entries,
-      ({
+      pool_foreach (ep, dm->entries)
+       {
         if (ep->flags & DNS_CACHE_ENTRY_FLAG_VALID)
           {
             ASSERT (ep->dns_response);
@@ -2194,7 +2194,7 @@
                         verbose);
           }
         vec_add1 (s, '\n');
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 51adbc2..bd8d435 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1429,7 +1429,7 @@
       devconf->x = conf->default_devconf.x ;
 
   /* *INDENT-OFF* */
-  pool_foreach (devconf, conf->dev_confs, ({
+  pool_foreach (devconf, conf->dev_confs)  {
 
     /* default per-device config items */
     foreach_dpdk_device_config_item
@@ -1471,7 +1471,7 @@
 	  tmp = format (0, "%U%c", format_vlib_pci_addr, &devconf->pci_addr, 0);
 	  vec_add1 (conf->eal_init_args, tmp);
     }
-  }));
+  }
   /* *INDENT-ON* */
 
 #undef _
diff --git a/src/plugins/flowprobe/flowprobe.c b/src/plugins/flowprobe/flowprobe.c
index 3df877a..37abcfc 100644
--- a/src/plugins/flowprobe/flowprobe.c
+++ b/src/plugins/flowprobe/flowprobe.c
@@ -791,12 +791,12 @@
   for (i = 0; i < vec_len (fm->pool_per_worker); i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (e, fm->pool_per_worker[i], (
+      pool_foreach (e, fm->pool_per_worker[i])
 	{
 	  vlib_cli_output (vm, "%U",
 			   format_flowprobe_entry,
 			   e);
-	}));
+	}
       /* *INDENT-ON* */
 
     }
diff --git a/src/plugins/gbp/gbp_bridge_domain.c b/src/plugins/gbp/gbp_bridge_domain.c
index f2a56d7..279169a 100644
--- a/src/plugins/gbp/gbp_bridge_domain.c
+++ b/src/plugins/gbp/gbp_bridge_domain.c
@@ -364,11 +364,11 @@
   gbp_bridge_domain_t *gbpe;
 
   /* *INDENT-OFF* */
-  pool_foreach(gbpe, gbp_bridge_domain_pool,
+  pool_foreach (gbpe, gbp_bridge_domain_pool)
   {
     if (!cb(gbpe, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/gbp/gbp_contract.c b/src/plugins/gbp/gbp_contract.c
index e12b331..dd433f2 100644
--- a/src/plugins/gbp/gbp_contract.c
+++ b/src/plugins/gbp/gbp_contract.c
@@ -567,11 +567,11 @@
   gbp_contract_t *gc;
 
   /* *INDENT-OFF* */
-  pool_foreach(gc, gbp_contract_pool,
-  ({
+  pool_foreach (gc, gbp_contract_pool)
+   {
     if (!cb(gc, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -710,8 +710,8 @@
   vlib_cli_output (vm, "Contracts:");
 
   /* *INDENT-OFF* */
-  pool_foreach (gc, gbp_contract_pool,
-  ({
+  pool_foreach (gc, gbp_contract_pool)
+   {
     gci = gc - gbp_contract_pool;
 
     if (SCLASS_INVALID != src && SCLASS_INVALID != dst)
@@ -732,7 +732,7 @@
       }
     else
       vlib_cli_output (vm, "  %U", format_gbp_contract, gci);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c
index 9cc69d0..b0cf64c 100644
--- a/src/plugins/gbp/gbp_endpoint.c
+++ b/src/plugins/gbp/gbp_endpoint.c
@@ -1063,11 +1063,11 @@
   u32 index;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(index, gbp_endpoint_pool,
+  pool_foreach_index (index, gbp_endpoint_pool)
   {
     if (!cb(index, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/gbp/gbp_endpoint_group.c b/src/plugins/gbp/gbp_endpoint_group.c
index 92bad37..b904437 100644
--- a/src/plugins/gbp/gbp_endpoint_group.c
+++ b/src/plugins/gbp/gbp_endpoint_group.c
@@ -241,11 +241,11 @@
   gbp_endpoint_group_t *gbpe;
 
   /* *INDENT-OFF* */
-  pool_foreach(gbpe, gbp_endpoint_group_pool,
+  pool_foreach (gbpe, gbp_endpoint_group_pool)
   {
     if (!cb(gbpe, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/gbp/gbp_ext_itf.c b/src/plugins/gbp/gbp_ext_itf.c
index e18bbe9..c550666 100644
--- a/src/plugins/gbp/gbp_ext_itf.c
+++ b/src/plugins/gbp/gbp_ext_itf.c
@@ -233,11 +233,11 @@
   gbp_ext_itf_t *ge;
 
   /* *INDENT-OFF* */
-  pool_foreach(ge, gbp_ext_itf_pool,
+  pool_foreach (ge, gbp_ext_itf_pool)
   {
     if (!cb(ge, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/gbp/gbp_itf.c b/src/plugins/gbp/gbp_itf.c
index 6a4a197..0c8f6a4 100644
--- a/src/plugins/gbp/gbp_itf.c
+++ b/src/plugins/gbp/gbp_itf.c
@@ -541,10 +541,10 @@
   vlib_cli_output (vm, "Interfaces:");
 
   /* *INDENT-OFF* */
-  pool_foreach_index (gii, gbp_itf_pool,
-  ({
+  pool_foreach_index (gii, gbp_itf_pool)
+   {
     vlib_cli_output (vm, "  [%d] %U", gii, format_gbp_itf, gii);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
diff --git a/src/plugins/gbp/gbp_recirc.c b/src/plugins/gbp/gbp_recirc.c
index 2b45d48..8d56f11 100644
--- a/src/plugins/gbp/gbp_recirc.c
+++ b/src/plugins/gbp/gbp_recirc.c
@@ -227,11 +227,11 @@
   gbp_recirc_t *ge;
 
   /* *INDENT-OFF* */
-  pool_foreach(ge, gbp_recirc_pool,
+  pool_foreach (ge, gbp_recirc_pool)
   {
     if (!cb(ge, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/gbp/gbp_route_domain.c b/src/plugins/gbp/gbp_route_domain.c
index 99c6e16..6cc595d 100644
--- a/src/plugins/gbp/gbp_route_domain.c
+++ b/src/plugins/gbp/gbp_route_domain.c
@@ -290,11 +290,11 @@
   gbp_route_domain_t *gbpe;
 
   /* *INDENT-OFF* */
-  pool_foreach(gbpe, gbp_route_domain_pool,
+  pool_foreach (gbpe, gbp_route_domain_pool)
   {
     if (!cb(gbpe, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/gbp/gbp_subnet.c b/src/plugins/gbp/gbp_subnet.c
index 2ef3fcf..8d3b571 100644
--- a/src/plugins/gbp/gbp_subnet.c
+++ b/src/plugins/gbp/gbp_subnet.c
@@ -424,8 +424,8 @@
   sw_if_index = ~0;
 
   /* *INDENT-OFF* */
-  pool_foreach (gs, gbp_subnet_pool,
-  ({
+  pool_foreach (gs, gbp_subnet_pool)
+   {
     grd = gbp_route_domain_get(gs->gs_rd);
 
     switch (gs->gs_type)
@@ -447,7 +447,7 @@
     if (WALK_STOP == cb (grd->grd_id, &gs->gs_key->gsk_pfx,
                          gs->gs_type, sw_if_index, sclass, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -549,11 +549,11 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(gsi, gbp_subnet_pool,
-      ({
+      pool_foreach_index (gsi, gbp_subnet_pool)
+       {
         vlib_cli_output (vm, "%U", format_gbp_subnet, gsi,
                          GBP_SUBNET_SHOW_BRIEF);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/gbp/gbp_vxlan.c b/src/plugins/gbp/gbp_vxlan.c
index 643089e..d3da2b5 100644
--- a/src/plugins/gbp/gbp_vxlan.c
+++ b/src/plugins/gbp/gbp_vxlan.c
@@ -306,11 +306,11 @@
   gbp_vxlan_tunnel_t *gt;
 
   /* *INDENT-OFF* */
-  pool_foreach (gt, gbp_vxlan_tunnel_pool,
-    ({
+  pool_foreach (gt, gbp_vxlan_tunnel_pool)
+     {
       if (WALK_CONTINUE != cb(gt, ctx))
         break;
-    }));
+    }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/geneve/geneve.c b/src/plugins/geneve/geneve.c
index 2c6f1ff..62502ef 100644
--- a/src/plugins/geneve/geneve.c
+++ b/src/plugins/geneve/geneve.c
@@ -903,12 +903,10 @@
   if (pool_elts (vxm->tunnels) == 0)
     vlib_cli_output (vm, "No geneve tunnels configured...");
 
-  pool_foreach (t, vxm->tunnels, (
-				   {
-				   vlib_cli_output (vm, "%U",
-						    format_geneve_tunnel, t);
-				   }
-		));
+  pool_foreach (t, vxm->tunnels)
+  {
+    vlib_cli_output (vm, "%U", format_geneve_tunnel, t);
+  }
 
   return 0;
 }
diff --git a/src/plugins/geneve/geneve_api.c b/src/plugins/geneve/geneve_api.c
index f6b9afd..d35a1bf 100644
--- a/src/plugins/geneve/geneve_api.c
+++ b/src/plugins/geneve/geneve_api.c
@@ -202,10 +202,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, vxm->tunnels,
-      ({
+      pool_foreach (t, vxm->tunnels)
+       {
         send_geneve_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/plugins/gtpu/gtpu.c b/src/plugins/gtpu/gtpu.c
index 65c3053..531e45a 100644
--- a/src/plugins/gtpu/gtpu.c
+++ b/src/plugins/gtpu/gtpu.c
@@ -914,12 +914,10 @@
   if (pool_elts (gtm->tunnels) == 0)
     vlib_cli_output (vm, "No gtpu tunnels configured...");
 
-  pool_foreach (t, gtm->tunnels, (
-				   {
-				   vlib_cli_output (vm, "%U",
-						    format_gtpu_tunnel, t);
-				   }
-		));
+  pool_foreach (t, gtm->tunnels)
+  {
+    vlib_cli_output (vm, "%U", format_gtpu_tunnel, t);
+  }
 
   return 0;
 }
diff --git a/src/plugins/gtpu/gtpu_api.c b/src/plugins/gtpu/gtpu_api.c
index 1100a7f..77432ba 100644
--- a/src/plugins/gtpu/gtpu_api.c
+++ b/src/plugins/gtpu/gtpu_api.c
@@ -239,10 +239,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, gtm->tunnels,
-      ({
+      pool_foreach (t, gtm->tunnels)
+       {
         send_gtpu_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/plugins/hs_apps/sapi/vpp_echo.c b/src/plugins/hs_apps/sapi/vpp_echo.c
index d6f0b28..03a3577 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo.c
@@ -263,11 +263,11 @@
   u32 *session_indexes = 0, *session_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (s, em->sessions,
-  ({
+  pool_foreach (s, em->sessions)
+   {
     if (s->session_state == ECHO_SESSION_STATE_CLOSED)
-      vec_add1 (session_indexes, s->session_index);}
-  ));
+      vec_add1 (session_indexes, s->session_index);
+   }
   /* *INDENT-ON* */
   vec_foreach (session_index, session_indexes)
   {
diff --git a/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c b/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c
index 95a468c..c67b35f 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c
@@ -240,8 +240,8 @@
   echo_session_t *s;
 
   /* *INDENT-OFF* */
-  pool_foreach (s, em->sessions,
-  ({
+  pool_foreach (s, em->sessions)
+   {
     if (s->session_type == ECHO_SESSION_TYPE_QUIC)
       {
         if (eqm->send_quic_disconnects == ECHO_CLOSE_F_ACTIVE)
@@ -260,7 +260,7 @@
         else
           ECHO_LOG (2,"%U: PASSIVE close", echo_format_session, s);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c
index b61243a..0ae6741 100644
--- a/src/plugins/http_static/static_server.c
+++ b/src/plugins/http_static/static_server.c
@@ -1610,10 +1610,10 @@
       for (i = 0; i < vec_len (hsm->sessions); i++)
 	{
           /* *INDENT-OFF* */
-	  pool_foreach (hs, hsm->sessions[i],
-          ({
+	  pool_foreach (hs, hsm->sessions[i])
+           {
             vec_add1 (session_indices, hs - hsm->sessions[i]);
-          }));
+          }
           /* *INDENT-ON* */
 
 	  for (j = 0; j < vec_len (session_indices); j++)
diff --git a/src/plugins/igmp/igmp_api.c b/src/plugins/igmp/igmp_api.c
index a298ff1..72c1b03 100644
--- a/src/plugins/igmp/igmp_api.c
+++ b/src/plugins/igmp/igmp_api.c
@@ -182,10 +182,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (config, im->configs,
-        ({
+      pool_foreach (config, im->configs)
+         {
           igmp_config_dump(im, rp, mp->context, config);
-        }));
+        }
       /* *INDENT-ON* */
     }
   else
@@ -403,12 +403,12 @@
 
 
   /* *INDENT-OFF* */
-  pool_foreach (api_client, im->api_clients,
-    ({
+  pool_foreach (api_client, im->api_clients)
+     {
       rp = vl_api_client_index_to_registration (api_client->client_index);
       if (rp)
         send_igmp_event (rp, filter, sw_if_index, saddr, gaddr);
-    }));
+    }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/igmp/igmp_cli.c b/src/plugins/igmp/igmp_cli.c
index 5eceb68..f84cdaf 100644
--- a/src/plugins/igmp/igmp_cli.c
+++ b/src/plugins/igmp/igmp_cli.c
@@ -356,10 +356,10 @@
   igmp_config_t *config;
 
   /* *INDENT-OFF* */
-  pool_foreach (config, im->configs,
-    ({
+  pool_foreach (config, im->configs)
+     {
       vlib_cli_output (vm, "%U", format_igmp_config, config);
-    }));
+    }
   /* *INDENT-ON* */
 
   return error;
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index 745943b..258087f 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -1070,14 +1070,14 @@
 
   /* find old IKE SAs with the same authenticated identity */
   /* *INDENT-OFF* */
-  pool_foreach (tmp, ptd->sas, ({
+  pool_foreach (tmp, ptd->sas)  {
     if (!ikev2_is_id_equal (&tmp->i_id, &sa->i_id)
         || !ikev2_is_id_equal(&tmp->r_id, &sa->r_id))
       continue;
 
     if (sa->rspi != tmp->rspi)
       vec_add1(delete, tmp - ptd->sas);
-  }));
+  }
   /* *INDENT-ON* */
 
   for (i = 0; i < vec_len (delete); i++)
@@ -1564,7 +1564,7 @@
   ikev2_id_t *id_rem, *id_loc;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
 
     if (sa->is_initiator)
       {
@@ -1607,7 +1607,7 @@
       }
 
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   if (tsi && tsr)
@@ -1667,7 +1667,7 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
 
     /* check id */
     if (!ikev2_is_id_equal (&p->rem_id, id_rem)
@@ -1707,7 +1707,7 @@
 
     vec_free(auth);
     vec_free(psk);
-  }));
+  }
   /* *INDENT-ON* */
 
   if (sel_p)
@@ -2679,11 +2679,11 @@
   ikev2_main_per_thread_data_t *ptd = ikev2_get_per_thread_data ();
 
   /* *INDENT-OFF* */
-  pool_foreach (sa, ptd->sas, ({
+  pool_foreach (sa, ptd->sas)  {
     res = ikev2_retransmit_sa_init_one (sa, ike, iaddr, raddr, rlen);
     if (res)
       return res;
-  }));
+  }
   /* *INDENT-ON* */
 
   /* req is not retransmit */
@@ -3750,10 +3750,10 @@
   u32 *del_sai = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach(sa, km->sais, ({
+  pool_foreach (sa, km->sais)  {
     if (pi == sa->profile_index)
       vec_add1 (del_sai, sa - km->sais);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (sai, del_sai)
@@ -3768,10 +3768,10 @@
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (sa->profile_index != ~0 && pi == sa->profile_index)
         vec_add1 (del_sai, sa - tkm->sas);
-    }));
+    }
     /* *INDENT-ON* */
 
     vec_foreach (sai, del_sai)
@@ -4403,14 +4403,14 @@
     if (fchild)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       fchild = ikev2_sa_get_child(sa, ispi, IKEV2_PROTOCOL_ESP, 1);
       if (fchild)
         {
           fsa = sa;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -4443,14 +4443,14 @@
     if (fsa)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (sa->ispi == ispi)
         {
           fsa = sa;
           ftkm = tkm;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -4526,14 +4526,14 @@
     if (fchild)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       fchild = ikev2_sa_get_child(sa, ispi, IKEV2_PROTOCOL_ESP, 1);
       if (fchild)
         {
           fsa = sa;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -4568,10 +4568,10 @@
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (ikev2_sa_sw_if_match (sa, sw_if_index))
         vec_add1 (sa_vec, sa);
-    }));
+    }
     /* *INDENT-ON* */
 
     vec_foreach (sap, sa_vec)
@@ -4583,10 +4583,10 @@
   vec_free (sa_vec);
 
   /* *INDENT-OFF* */
-  pool_foreach (sa, km->sais, ({
+  pool_foreach (sa, km->sais)  {
     if (ikev2_sa_sw_if_match (sa, sw_if_index))
       vec_add1 (ispi_vec, sa->ispi);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (ispi, ispi_vec)
@@ -4607,10 +4607,10 @@
     return 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
     if (p->responder.sw_if_index == sw_if_index)
       ikev2_sa_del (p, sw_if_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -4839,14 +4839,14 @@
     if (fchild)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       fchild = ikev2_sa_get_child(sa, ipsec_sa->spi, IKEV2_PROTOCOL_ESP, 1);
       if (fchild)
         {
           fsa = sa;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
   vlib_get_combined_counter (&ipsec_sa_counters,
@@ -5029,7 +5029,7 @@
 	u32 *to_be_deleted = 0;
 
         /* *INDENT-OFF* */
-        pool_foreach (sa, tkm->sas, ({
+        pool_foreach (sa, tkm->sas)  {
           ikev2_child_sa_t *c;
           u8 del_old_ids = 0;
 
@@ -5049,7 +5049,7 @@
 
           if (!km->dpd_disabled && ikev2_mngr_process_responder_sas (sa))
             vec_add1 (to_be_deleted, sa - tkm->sas);
-        }));
+        }
         /* *INDENT-ON* */
 
 	vec_foreach (sai, to_be_deleted)
@@ -5085,9 +5085,9 @@
       /* process ipsec sas */
       ipsec_sa_t *sa;
       /* *INDENT-OFF* */
-      pool_foreach (sa, im->sad, ({
+      pool_foreach (sa, im->sad)  {
         ikev2_mngr_process_ipsec_sa(sa);
-      }));
+      }
       /* *INDENT-ON* */
 
       ikev2_process_pending_sa_init (km);
diff --git a/src/plugins/ikev2/ikev2_api.c b/src/plugins/ikev2/ikev2_api.c
index dd4c094..00d7114 100644
--- a/src/plugins/ikev2/ikev2_api.c
+++ b/src/plugins/ikev2/ikev2_api.c
@@ -187,10 +187,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (profile, im->profiles,
-  ({
+  pool_foreach (profile, im->profiles)
+   {
     send_profile (profile, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -268,12 +268,12 @@
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas,
-    ({
+    pool_foreach (sa, tkm->sas)
+     {
       u32 api_sa_index = ikev2_encode_sa_index (sa - tkm->sas,
                                               tkm - km->per_thread_data);
       send_sa (sa, mp, api_sa_index);
-    }));
+    }
     /* *INDENT-ON* */
   }
 }
diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c
index 72f82b4..1bb2dd9 100644
--- a/src/plugins/ikev2/ikev2_cli.c
+++ b/src/plugins/ikev2/ikev2_cli.c
@@ -219,7 +219,7 @@
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (show_one)
         {
           if (sa->rspi == rspi)
@@ -230,7 +230,7 @@
         }
       else
         s = format (s, "%U\n", format_ikev2_sa, sa, details);
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -562,7 +562,7 @@
   ikev2_profile_t *p;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
     vlib_cli_output(vm, "profile %v", p->name);
 
     if (p->auth.data)
@@ -652,7 +652,7 @@
 
     vlib_cli_output(vm, "  lifetime %d jitter %d handover %d maxdata %d",
                     p->lifetime, p->lifetime_jitter, p->handover, p->lifetime_maxdata);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/plugins/ila/ila.c b/src/plugins/ila/ila.c
index 162d417..366abc9 100644
--- a/src/plugins/ila/ila.c
+++ b/src/plugins/ila/ila.c
@@ -1070,10 +1070,10 @@
   ila_entry_t *e;
 
   vlib_cli_output (vm, "  %U\n", format_ila_entry, vnm, NULL);
-  pool_foreach (e, ilm->entries,
-    ({
+  pool_foreach (e, ilm->entries)
+     {
       vlib_cli_output (vm, "  %U\n", format_ila_entry, vnm, e);
-    }));
+    }
 
   return NULL;
 }
diff --git a/src/plugins/ioam/ip6/ioam_cache.c b/src/plugins/ioam/ip6/ioam_cache.c
index 74b50c9..d9f7029 100644
--- a/src/plugins/ioam/ip6/ioam_cache.c
+++ b/src/plugins/ioam/ip6/ioam_cache.c
@@ -253,12 +253,10 @@
   int no_of_threads = vec_len (vlib_worker_threads);
   int i;
 
-  pool_foreach (entry, cm->ioam_rewrite_pool, (
-						{
-						vlib_cli_output (vm, "%U",
-								 format_ioam_cache_entry,
-								 entry);
-						}));
+  pool_foreach (entry, cm->ioam_rewrite_pool)
+  {
+    vlib_cli_output (vm, "%U", format_ioam_cache_entry, entry);
+  }
 
   if (cm->ts_stats)
     for (i = 0; i < no_of_threads; i++)
@@ -269,16 +267,11 @@
 
 	if (verbose == 1)
 	  vlib_worker_thread_barrier_sync (vm);
-	pool_foreach (ts_entry, cm->ioam_ts_pool[i], (
-						       {
-						       vlib_cli_output (vm,
-									"%U",
-									format_ioam_cache_ts_entry,
-									ts_entry,
-									(u32)
-									i);
-						       }
-		      ));
+	pool_foreach (ts_entry, cm->ioam_ts_pool[i])
+	{
+	  vlib_cli_output (vm, "%U", format_ioam_cache_ts_entry, ts_entry,
+			   (u32) i);
+	}
 	vlib_worker_thread_barrier_release (vm);
       }
 
diff --git a/src/plugins/ioam/ip6/ioam_cache.h b/src/plugins/ioam/ip6/ioam_cache.h
index dc4ae00..b85172e 100644
--- a/src/plugins/ioam/ip6/ioam_cache.h
+++ b/src/plugins/ioam/ip6/ioam_cache.h
@@ -471,10 +471,10 @@
   ioam_cache_entry_t *entry = 0;
   /* free pool and hash table */
   clib_bihash_free_8_8 (&cm->ioam_rewrite_cache_table);
-  pool_foreach (entry, cm->ioam_rewrite_pool, (
-						{
-						ioam_cache_entry_free (entry);
-						}));
+  pool_foreach (entry, cm->ioam_rewrite_pool)
+  {
+    ioam_cache_entry_free (entry);
+  }
   pool_free (cm->ioam_rewrite_pool);
   cm->ioam_rewrite_pool = 0;
   vec_free (cm->sr_rewrite_template);
@@ -610,13 +610,10 @@
   /* free pool and hash table */
   for (i = 0; i < no_of_threads; i++)
     {
-      pool_foreach (entry, cm->ioam_ts_pool[i], (
-						  {
-						  ioam_cache_ts_entry_free (i,
-									    entry,
-									    cm->error_node_index);
-						  }
-		    ));
+      pool_foreach (entry, cm->ioam_ts_pool[i])
+      {
+	ioam_cache_ts_entry_free (i, entry, cm->error_node_index);
+      }
       pool_free (cm->ioam_ts_pool[i]);
       cm->ioam_ts_pool = 0;
       tw_timer_wheel_free_16t_2w_512sl (&cm->timer_wheels[i]);
diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c
index 5a59e75..108b0c0 100644
--- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c
+++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c
@@ -187,11 +187,10 @@
   vnet_main_t *vnm = vnet_get_main ();
   vnet_interface_main_t *im = &vnm->interface_main;
 
-  pool_foreach (si, im->sw_interfaces, (
-					 {
-					 vxlan_gpe_set_clear_output_feature_on_intf
-					 (vm, si->sw_if_index, 0);
-					 }));
+  pool_foreach (si, im->sw_interfaces)
+  {
+    vxlan_gpe_set_clear_output_feature_on_intf (vm, si->sw_if_index, 0);
+  }
   return;
 }
 
@@ -377,17 +376,12 @@
   i = vec_len (hm->bool_ref_by_sw_if_index);
   vec_free (hm->bool_ref_by_sw_if_index);
   vec_validate_init_empty (hm->bool_ref_by_sw_if_index, i, ~0);
-  pool_foreach (t, hm->dst_tunnels, (
-				      {
-				      vxlan_gpe_enable_disable_ioam_for_dest
-				      (hm->vlib_main,
-				       t->dst_addr,
-				       t->outer_fib_index,
-				       (t->fp_proto == FIB_PROTOCOL_IP4), 1
-				       /* is_add */
-				      );
-				      }
-		));
+  pool_foreach (t, hm->dst_tunnels)
+  {
+    vxlan_gpe_enable_disable_ioam_for_dest
+      (hm->vlib_main, t->dst_addr, t->outer_fib_index,
+       (t->fp_proto == FIB_PROTOCOL_IP4), 1 /* is_add */ );
+  }
   return;
 }
 
@@ -621,16 +615,14 @@
       return 0;
     }
 
-  pool_foreach (t, hm->dst_tunnels, (
-				      {
-				      vxlan_gpe_enable_disable_ioam_for_dest
-				      (hm->vlib_main,
-				       t->dst_addr,
-				       t->outer_fib_index,
-				       (t->fp_proto ==
-					FIB_PROTOCOL_IP4), 1 /* is_add */ );
-				      }
-		));
+  pool_foreach (t, hm->dst_tunnels)
+  {
+    vxlan_gpe_enable_disable_ioam_for_dest
+      (hm->vlib_main,
+       t->dst_addr,
+       t->outer_fib_index,
+       (t->fp_proto == FIB_PROTOCOL_IP4), 1 /* is_add */ );
+  }
   vxlan_gpe_clear_output_feature_on_select_intfs ();
   return (0);
 
diff --git a/src/plugins/l2tp/l2tp.c b/src/plugins/l2tp/l2tp.c
index 242f432..08fa6d1 100644
--- a/src/plugins/l2tp/l2tp.c
+++ b/src/plugins/l2tp/l2tp.c
@@ -130,10 +130,10 @@
       vlib_cli_output (vm, "L2tp session lookup on %s", keystr);
 
       /* *INDENT-OFF* */
-      pool_foreach (session, lm->sessions,
-      ({
+      pool_foreach (session, lm->sessions)
+       {
         vlib_cli_output (vm, "%U", format_l2t_session, session);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
@@ -160,8 +160,8 @@
   u32 thread_index = vm->thread_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (session, lm->sessions,
-  ({
+  pool_foreach (session, lm->sessions)
+   {
     session_index = session - lm->sessions;
     counter_index =
       session_index_to_counter_index (session_index,
@@ -176,7 +176,7 @@
                                      1/*pkt*/, 2222 /*bytes*/);
     nincr++;
 
-  }));
+  }
   /* *INDENT-ON* */
   vlib_cli_output (vm, "Incremented %d active counters\n", nincr);
 
@@ -202,8 +202,8 @@
   u32 nincr = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (session, lm->sessions,
-  ({
+  pool_foreach (session, lm->sessions)
+   {
     session_index = session - lm->sessions;
     counter_index =
       session_index_to_counter_index (session_index,
@@ -211,7 +211,7 @@
     vlib_zero_combined_counter (&lm->counter_main, counter_index);
     vlib_zero_combined_counter (&lm->counter_main, counter_index+1);
     nincr++;
-  }));
+  }
   /* *INDENT-ON* */
   vlib_cli_output (vm, "Cleared %d active counters\n", nincr);
 
diff --git a/src/plugins/l2tp/l2tp_api.c b/src/plugins/l2tp/l2tp_api.c
index fb675dd..ba9d268 100644
--- a/src/plugins/l2tp/l2tp_api.c
+++ b/src/plugins/l2tp/l2tp_api.c
@@ -90,10 +90,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (session, lm->sessions,
-  ({
+  pool_foreach (session, lm->sessions)
+   {
     send_sw_if_l2tpv3_tunnel_details (am, reg, session, lm, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/l3xc/l3xc.c b/src/plugins/l3xc/l3xc.c
index 9839278..21f3eea 100644
--- a/src/plugins/l3xc/l3xc.c
+++ b/src/plugins/l3xc/l3xc.c
@@ -305,11 +305,11 @@
   u32 l3xci;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(l3xci, l3xc_pool,
-  ({
+  pool_foreach_index (l3xci, l3xc_pool)
+   {
     if (!cb(l3xci, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -320,10 +320,10 @@
   l3xc_t *l3xc;
 
   /* *INDENT-OFF* */
-  pool_foreach(l3xc, l3xc_pool,
-  ({
+  pool_foreach (l3xc, l3xc_pool)
+   {
     vlib_cli_output(vm, "%U", format_l3xc, l3xc);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
diff --git a/src/plugins/lacp/cli.c b/src/plugins/lacp/cli.c
index 7abc6f0..fee9a5a 100644
--- a/src/plugins/lacp/cli.c
+++ b/src/plugins/lacp/cli.c
@@ -29,7 +29,7 @@
   lacp_interface_details_t *lacpif = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif, bm->neighbors,
+  pool_foreach (mif, bm->neighbors) {
     if (mif->lacp_enabled == 0)
       continue;
     vec_add2(r_lacpifs, lacpif, 1);
@@ -60,7 +60,7 @@
     lacpif->tx_state = mif->tx_state;
     lacpif->ptx_state = mif->ptx_state;
     lacpif->mux_state = mif->mux_state;
-  );
+  }
   /* *INDENT-ON* */
 
   *out_lacpifs = r_lacpifs;
@@ -295,9 +295,8 @@
 
   if (vec_len (sw_if_indices) == 0)
     {
-      pool_foreach (mif, bm->neighbors,
-		    vec_add1 (sw_if_indices, mif->sw_if_index);
-	);
+      pool_foreach (mif, bm->neighbors)
+	vec_add1 (sw_if_indices, mif->sw_if_index);
     }
 
   if (details)
diff --git a/src/plugins/lacp/lacp.c b/src/plugins/lacp/lacp.c
index 319a8f7..44a32aa 100644
--- a/src/plugins/lacp/lacp.c
+++ b/src/plugins/lacp/lacp.c
@@ -143,8 +143,8 @@
   u8 actor_state, partner_state;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif, bm->neighbors,
-  ({
+  pool_foreach (mif, bm->neighbors)
+   {
     if (mif->port_enabled == 0)
       continue;
 
@@ -184,7 +184,7 @@
 					[mif->sw_if_index].partner_state,
 					mif->partner.state);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/lacp/rx_machine.c b/src/plugins/lacp/rx_machine.c
index 60edc80..6e36a66 100644
--- a/src/plugins/lacp/rx_machine.c
+++ b/src/plugins/lacp/rx_machine.c
@@ -344,7 +344,7 @@
   lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->last_rx_pkt;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif2, bm->neighbors, {
+  pool_foreach (mif2, bm->neighbors) {
       {
 	if ((mif != mif2) && (mif2->rx_state == LACP_RX_STATE_PORT_DISABLED) &&
 	    !memcmp (mif2->partner.system,
@@ -352,7 +352,7 @@
 	    (mif2->partner.port_number == lacpdu->partner.port_info.port_number))
 	  return 1;
       }
-  });
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/plugins/lb/api.c b/src/plugins/lb/api.c
index 176da24..e44f815 100644
--- a/src/plugins/lb/api.c
+++ b/src/plugins/lb/api.c
@@ -177,7 +177,7 @@
   lb_vip_t *vip = 0;
 
   /* construct vip list */
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
       /* Hide placeholder VIP */
       if (vip != lbm->vips) {
         msg_size = sizeof (*rmp);
@@ -199,7 +199,7 @@
 
         vl_api_send_msg (reg, (u8 *) rmp);
       }
-  });
+  }
 
 
 }
@@ -216,7 +216,7 @@
   /* construct as list under this vip */
   lb_as_t *as;
 
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       /* Hide placeholder As for specific VIP */
       if (*as_index != 0) {
         as = &lbm->ass[*as_index];
@@ -237,7 +237,7 @@
         vl_api_send_msg (reg, (u8 *) rmp);
         asindex++;
       }
-  });
+  }
 
 
 }
@@ -261,8 +261,8 @@
   dump_all = (prefix.ip6.as_u64[0] == 0) && (prefix.ip6.as_u64[1] == 0);
 
   /* *INDENT-OFF* */
-  pool_foreach(vip, lbm->vips,
-  ({
+  pool_foreach (vip, lbm->vips)
+   {
     if ( dump_all
         || ((prefix.as_u64[0] == vip->prefix.as_u64[0])
         && (prefix.as_u64[1] == vip->prefix.as_u64[1])
@@ -271,7 +271,7 @@
       {
         send_lb_as_details(reg, mp->context, vip);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/lb/cli.c b/src/plugins/lb/cli.c
index ecc5e66..7b5dc5c 100644
--- a/src/plugins/lb/cli.c
+++ b/src/plugins/lb/cli.c
@@ -387,11 +387,11 @@
     verbose = 1;
 
   /* Hide placeholder VIP */
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
     if (vip != lbm->vips) {
       vlib_cli_output(vm, "%U\n", verbose?format_lb_vip_detailed:format_lb_vip, vip);
     }
-  });
+  }
 
   unformat_free (&line_input);
   return NULL;
diff --git a/src/plugins/lb/lb.c b/src/plugins/lb/lb.c
index 21a1484..6fc7f0f 100644
--- a/src/plugins/lb/lb.c
+++ b/src/plugins/lb/lb.c
@@ -255,7 +255,7 @@
 
   lb_as_t *as;
   u32 *as_index;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       s = format(s, "%U    %U %u buckets   %Lu flows  dpo:%u %s\n",
                    format_white_space, indent,
@@ -264,7 +264,7 @@
                    vlib_refcount_get(&lbm->as_refcount, as - lbm->ass),
                    as->dpo.dpoi_index,
                    (as->flags & LB_AS_FLAGS_USED)?"used":" removed");
-  });
+  }
 
   vec_free(count);
   return s;
@@ -302,7 +302,7 @@
   vip->last_garbage_collection = now;
   lb_as_t *as;
   u32 *as_index;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       if (!(as->flags & LB_AS_FLAGS_USED) && //Not used
           clib_u32_loop_gt(now, as->last_used + LB_CONCURRENCY_TIMEOUT) &&
@@ -351,7 +351,7 @@
           pool_put(vip->as_indexes, as_index);
           pool_put(lbm->ass, as);
         }
-  });
+  }
 }
 
 void lb_garbage_collection()
@@ -360,14 +360,14 @@
   lb_get_writer_lock();
   lb_vip_t *vip;
   u32 *to_be_removed_vips = 0, *i;
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
       lb_vip_garbage_collection(vip);
 
       if (!(vip->flags & LB_VIP_FLAGS_USED) &&
           (pool_elts(vip->as_indexes) == 0)) {
         vec_add1(to_be_removed_vips, vip - lbm->vips);
       }
-  });
+  }
 
   vec_foreach(i, to_be_removed_vips) {
     vip = &lbm->vips[*i];
@@ -392,13 +392,13 @@
 
   //Check if some AS is configured or not
   i = 0;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       if (as->flags & LB_AS_FLAGS_USED) { //Not used anymore
         i = 1;
         goto out; //Not sure 'break' works in this macro-loop
       }
-  });
+  }
 
 out:
   if (i == 0) {
@@ -414,14 +414,14 @@
   vec_alloc(sort_arr, pool_elts(vip->as_indexes));
 
   i = 0;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       if (!(as->flags & LB_AS_FLAGS_USED)) //Not used anymore
         continue;
 
       sort_arr[i].as_index = as - lbm->ass;
       i++;
-  });
+  }
   _vec_len(sort_arr) = i;
 
   vec_sort_with_function(sort_arr, lb_pseudorand_compare);
@@ -503,7 +503,7 @@
   /* This must be called with the lock owned */
   CLIB_SPINLOCK_ASSERT_LOCKED (&lbm->writer_lock);
   ip46_prefix_normalize(prefix, plen);
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
       if ((vip->flags & LB_AS_FLAGS_USED) &&
           vip->plen == plen &&
           vip->prefix.as_u64[0] == prefix->as_u64[0] &&
@@ -522,7 +522,7 @@
               return 0;
             }
         }
-  });
+  }
   return VNET_API_ERROR_NO_SUCH_ENTRY;
 }
 
@@ -569,7 +569,7 @@
   CLIB_SPINLOCK_ASSERT_LOCKED (&lbm->writer_lock);
   lb_as_t *as;
   u32 *asi;
-  pool_foreach(asi, vip->as_indexes, {
+  pool_foreach (asi, vip->as_indexes) {
       as = &lbm->ass[*asi];
       if (as->vip_index == (vip - lbm->vips) &&
           as->address.as_u64[0] == address->as_u64[0] &&
@@ -578,7 +578,7 @@
         *as_index = as - lbm->ass;
         return 0;
       }
-  });
+  }
   return -1;
 }
 
@@ -1224,10 +1224,10 @@
     lb_as_t *as;
     u32 *as_index;
 
-    pool_foreach(as_index, vip->as_indexes, {
+    pool_foreach (as_index, vip->as_indexes) {
         as = &lbm->ass[*as_index];
         vec_add1(ass, as->address);
-    });
+    }
     if (vec_len(ass))
       lb_vip_del_ass_withlock(vip_index, ass, vec_len(ass), 0);
     vec_free(ass);
diff --git a/src/plugins/lisp/lisp-cp/control.c b/src/plugins/lisp/lisp-cp/control.c
index 6eee74a..446a8d7 100644
--- a/src/plugins/lisp/lisp-cp/control.c
+++ b/src/plugins/lisp/lisp-cp/control.c
@@ -581,15 +581,15 @@
   lisp_adjacency_t *adjs = 0, adj;
 
   /* *INDENT-OFF* */
-  pool_foreach(fwd, lcm->fwd_entry_pool,
-  ({
+  pool_foreach (fwd, lcm->fwd_entry_pool)
+   {
     if (gid_address_vni (&fwd->reid) != vni)
       continue;
 
     gid_address_copy (&adj.reid, &fwd->reid);
     gid_address_copy (&adj.leid, &fwd->leid);
     vec_add1 (adjs, adj);
-  }));
+  }
   /* *INDENT-ON* */
 
   return adjs;
@@ -804,8 +804,8 @@
 	   * TODO: Address this in a more efficient way.
 	   */
 	  /* *INDENT-OFF* */
-	  pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies,
-	  ({
+	  pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies)
+	   {
 	    vec_foreach_index (rmts_itr, rmts[0])
 	    {
 	      remote_idx = vec_elt (rmts[0], rmts_itr);
@@ -815,7 +815,7 @@
 		  break;
 		}
 	    }
-	  }));
+	  }
 	  /* *INDENT-ON* */
 	}
 
@@ -1392,10 +1392,10 @@
   vnet_lisp_add_del_locator_set_args_t _ls, *ls = &_ls;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (mi, lcm->mapping_pool,
-  ({
+  pool_foreach_index (mi, lcm->mapping_pool)
+   {
     vec_add1 (map_indices, mi);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (map_indexp, map_indices)
@@ -2191,10 +2191,10 @@
   pool_free (lcm->fwd_entry_pool);
   /* Clear state tracking rmt-lcl fwd entries */
   /* *INDENT-OFF* */
-  pool_foreach(rmts, lcm->lcl_to_rmt_adjacencies,
+  pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies)
   {
     vec_free(rmts[0]);
-  });
+  }
   /* *INDENT-ON* */
   hash_free (lcm->lcl_to_rmt_adjs_by_lcl_idx);
   pool_free (lcm->lcl_to_rmt_adjacencies);
@@ -2672,7 +2672,7 @@
   mapping_t *recs = 0, rec, *m;
 
   /* *INDENT-OFF* */
-  pool_foreach(m, lcm->mapping_pool,
+  pool_foreach (m, lcm->mapping_pool)
   {
     /* for now build only local mappings */
     if (!m->local)
@@ -2681,7 +2681,7 @@
     rec = m[0];
     add_locators (lcm, &rec, m->locator_set_index, NULL);
     vec_add1 (recs, rec);
-  });
+  }
   /* *INDENT-ON* */
 
   return recs;
@@ -2902,7 +2902,7 @@
   u32 si, rloc_probes_sent = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (e, lcm->fwd_entry_pool,
+  pool_foreach (e, lcm->fwd_entry_pool)
   {
     if (vec_len (e->locator_pairs) == 0)
       continue;
@@ -2930,7 +2930,7 @@
                          &lp->rmt_loc);
         rloc_probes_sent++;
       }
-  });
+  }
   /* *INDENT-ON* */
 
   vlib_node_increment_counter (vlib_get_main (), lisp_cp_output_node.index,
@@ -3041,15 +3041,15 @@
   /* if there is already a pending request remember it */
 
   /* *INDENT-OFF* */
-  pool_foreach(pmr, lcm->pending_map_requests_pool,
-  ({
+  pool_foreach (pmr, lcm->pending_map_requests_pool)
+   {
     if (!gid_address_cmp (&pmr->src, seid)
         && !gid_address_cmp (&pmr->dst, deid))
       {
         duplicate_pmr = pmr;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (!is_resend && duplicate_pmr)
@@ -4066,10 +4066,10 @@
 
   /* Cleanup first */
   /* *INDENT-OFF* */
-  pool_foreach (rec, lcm->map_records_args_pool[vlib_get_thread_index()], ({
+  pool_foreach (rec, lcm->map_records_args_pool[vlib_get_thread_index()])  {
     if (rec->is_free)
       map_records_arg_free (rec);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_get (lcm->map_records_args_pool[vlib_get_thread_index ()], rec);
@@ -4656,8 +4656,8 @@
   u32 *to_be_removed = 0, *pmr_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (pmr, lcm->pending_map_requests_pool,
-  ({
+  pool_foreach (pmr, lcm->pending_map_requests_pool)
+   {
     if (pmr->to_be_removed)
       {
         clib_fifo_foreach (nonce, pmr->nonces, ({
@@ -4666,7 +4666,7 @@
 
         vec_add1 (to_be_removed, pmr - lcm->pending_map_requests_pool);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (pmr_index, to_be_removed)
@@ -4754,15 +4754,15 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (pmr, lcm->pending_map_registers_pool,
-  ({
+  pool_foreach (pmr, lcm->pending_map_registers_pool)
+   {
     if (!update_pending_map_register (pmr, dt, &del_all))
     {
       if (del_all)
         break;
       vec_add1 (to_be_removed, pmr - lcm->pending_map_registers_pool);
     }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (del_all)
@@ -4814,11 +4814,11 @@
       (void) vlib_process_get_events (vm, 0);
 
       /* *INDENT-OFF* */
-      pool_foreach (pmr, lcm->pending_map_requests_pool,
-      ({
+      pool_foreach (pmr, lcm->pending_map_requests_pool)
+       {
         if (!pmr->to_be_removed)
           update_pending_request (pmr, period);
-      }));
+      }
       /* *INDENT-ON* */
 
       remove_dead_pending_map_requests (lcm);
diff --git a/src/plugins/lisp/lisp-cp/lisp_api.c b/src/plugins/lisp/lisp-cp/lisp_api.c
index 041069d..d8f889a 100644
--- a/src/plugins/lisp/lisp-cp/lisp_api.c
+++ b/src/plugins/lisp/lisp-cp/lisp_api.c
@@ -590,8 +590,8 @@
 
   filter = mp->filter;
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     if (filter && !((1 == filter && lsit->local) ||
                     (2 == filter && !lsit->local)))
       {
@@ -599,7 +599,7 @@
       }
     send_lisp_locator_set_details (lcm, lsit, reg, mp->context,
                                    lsit - lcm->locator_set_pool);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -704,11 +704,11 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         send_lisp_eid_table_details(mapit, reg, mp->context,
                                     mp->filter);
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
diff --git a/src/plugins/lisp/lisp-cp/lisp_cli.c b/src/plugins/lisp/lisp-cp/lisp_cli.c
index 8685c1c..569d695 100644
--- a/src/plugins/lisp/lisp-cp/lisp_cli.c
+++ b/src/plugins/lisp/lisp-cp/lisp_cli.c
@@ -841,8 +841,8 @@
   if (print_all)
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         if (mapit->pitr_set)
           continue;
 
@@ -855,7 +855,7 @@
           }
         vlib_cli_output (vm, "%U", format_eid_entry, lcm->vnet_main,
                          lcm, mapit, ls);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -1300,8 +1300,8 @@
 		   "Priority", "Weight");
 
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     u8 * msg = 0;
     int next_line = 0;
     if (lsit->local)
@@ -1330,7 +1330,7 @@
       }
     vlib_cli_output (vm, "%v", msg);
     vec_free (msg);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
diff --git a/src/plugins/lisp/lisp-cp/one_api.c b/src/plugins/lisp/lisp-cp/one_api.c
index eb0b4c6..3969dd2 100644
--- a/src/plugins/lisp/lisp-cp/one_api.c
+++ b/src/plugins/lisp/lisp-cp/one_api.c
@@ -791,8 +791,8 @@
 
   filter = mp->filter;
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     if (filter && !((1 == filter && lsit->local) ||
                     (2 == filter && !lsit->local)))
       {
@@ -800,7 +800,7 @@
       }
     send_one_locator_set_details (lcm, lsit, reg, mp->context,
                                    lsit - lcm->locator_set_pool);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -921,11 +921,11 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         send_one_eid_table_details(mapit, reg, mp->context,
                                     mp->filter);
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
diff --git a/src/plugins/lisp/lisp-cp/one_cli.c b/src/plugins/lisp/lisp-cp/one_cli.c
index b435326..b85fea1 100644
--- a/src/plugins/lisp/lisp-cp/one_cli.c
+++ b/src/plugins/lisp/lisp-cp/one_cli.c
@@ -1157,8 +1157,8 @@
   if (print_all)
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         if (mapit->pitr_set || mapit->nsh_set)
           continue;
 
@@ -1171,7 +1171,7 @@
           }
         vlib_cli_output (vm, "%U", format_eid_entry, lcm->vnet_main,
                          lcm, mapit, ls);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -1841,8 +1841,8 @@
 		   "Priority", "Weight");
 
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     u8 * msg = 0;
     int next_line = 0;
     if (lsit->local)
@@ -1871,7 +1871,7 @@
       }
     vlib_cli_output (vm, "%v", msg);
     vec_free (msg);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
index d93f3ab..8d20412 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
@@ -559,13 +559,13 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (ladj, lisp_adj_pool,
-      ({
+      pool_foreach (ladj, lisp_adj_pool)
+       {
 	vlib_cli_output (vm, "[%d] %U\n",
 			 ladj - lisp_adj_pool,
 			 format_lisp_gpe_adjacency, ladj,
 			 LISP_GPE_ADJ_FORMAT_FLAG_NONE);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
index 00d5af4..5f196fb 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -1357,8 +1357,8 @@
   lisp_gpe_fwd_entry_t *lfe;
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     switch (fid_addr_type(&lfe->key->rmt))
       {
       case FID_ADDR_MAC:
@@ -1371,7 +1371,7 @@
         del_nsh_fwd_entry_i (lgm, lfe);
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1477,13 +1477,13 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     if ((vni == ~0) ||
 	(lfe->key->vni == vni))
       vlib_cli_output (vm, "%U", format_lisp_gpe_fwd_entry, lfe,
 		       LISP_GPE_FWD_ENTRY_FORMAT_NONE);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
@@ -1522,10 +1522,10 @@
   u32 *vnis = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     hash_set (vnis, lfe->key->vni, 0);
-  }));
+  }
   /* *INDENT-ON* */
 
   return vnis;
@@ -1539,8 +1539,8 @@
   lisp_api_gpe_fwd_entry_t *entries = 0, e;
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     if (lfe->key->vni == vni)
       {
         clib_memset (&e, 0, sizeof (e));
@@ -1553,7 +1553,7 @@
         memcpy (&e.leid, &lfe->key->lcl, sizeof (e.leid));
         vec_add1 (entries, e);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return entries;
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
index b84c76f..9c48c00 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
@@ -245,10 +245,10 @@
 		   "local RLOC");
 
   /* *INDENT-OFF* */
-  pool_foreach (l3s, lisp_gpe_sub_interface_pool,
-  ({
+  pool_foreach (l3s, lisp_gpe_sub_interface_pool)
+   {
     vlib_cli_output (vm, "%U", format_lisp_gpe_sub_interface, l3s);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
index fb6aa1a..b6173b2 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
@@ -263,11 +263,11 @@
   lisp_gpe_tenant_t *lt;
 
   /* *INDENT-OFF* */
-  pool_foreach(lt, lisp_gpe_tenant_pool,
-  ({
+  pool_foreach (lt, lisp_gpe_tenant_pool)
+   {
     lisp_gpe_tenant_l2_iface_unlock(lt->lt_vni);
     lisp_gpe_tenant_l3_iface_unlock(lt->lt_vni);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -306,10 +306,10 @@
   lisp_gpe_tenant_t *lt;
 
   /* *INDENT-OFF* */
-  pool_foreach (lt, lisp_gpe_tenant_pool,
-  ({
+  pool_foreach (lt, lisp_gpe_tenant_pool)
+   {
     vlib_cli_output (vm, "%U", format_lisp_gpe_tenant, lt);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
index b242642..14ee095 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
@@ -254,10 +254,10 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (lgt, lisp_gpe_tunnel_pool,
-      ({
+      pool_foreach (lgt, lisp_gpe_tunnel_pool)
+       {
 	vlib_cli_output (vm, "%U", format_lisp_gpe_tunnel, lgt);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/lldp/lldp_cli.c b/src/plugins/lldp/lldp_cli.c
index ef3fccc..583804d 100644
--- a/src/plugins/lldp/lldp_cli.c
+++ b/src/plugins/lldp/lldp_cli.c
@@ -581,8 +581,8 @@
   f64 now = vlib_time_now (vm);
 
   /* *INDENT-OFF* */
-  pool_foreach(
-      n, lm->intfs, ({
+  pool_foreach (
+      n, lm->intfs)  {
         hw = vnet_get_hw_interface(vnm, n->hw_if_index);
         sw = vnet_get_sw_interface(lm->vnet_main, hw->sw_if_index);
 
@@ -639,7 +639,7 @@
                        vec_len(n->port_id), 1, format_time_ago, n->last_sent,
                        now, format_time_ago, n->last_heard, now);
           }
-      }));
+      }
   /* *INDENT-ON* */
   return s;
 }
@@ -664,8 +664,8 @@
 	      "Status");
 
   /* *INDENT-OFF* */
-  pool_foreach(
-      n, lm->intfs, ({
+  pool_foreach (
+      n, lm->intfs)  {
         const vnet_hw_interface_t *hw =
             vnet_get_hw_interface(vnm, n->hw_if_index);
         const vnet_sw_interface_t *sw =
@@ -688,7 +688,7 @@
                        "", "", format_time_ago, n->last_heard, now,
                        format_time_ago, n->last_sent, now, "inactive");
           }
-      }));
+      }
   /* *INDENT-ON* */
   return s;
 }
diff --git a/src/plugins/mactime/builtins.c b/src/plugins/mactime/builtins.c
index 1525ab6..d7fd7a0 100644
--- a/src/plugins/mactime/builtins.c
+++ b/src/plugins/mactime/builtins.c
@@ -43,10 +43,10 @@
     mm->sunday_midnight = clib_timebase_find_sunday_midnight (now);
 
     /* *INDENT-OFF* */
-    pool_foreach (dp, mm->devices,
-    ({
+    pool_foreach (dp, mm->devices)
+     {
         vec_add1 (pool_indices, dp - mm->devices);
-    }));
+    }
     /* *INDENT-ON* */
 
   s = format (s, "{%smactime%s: [\n", q, q);
diff --git a/src/plugins/mactime/mactime.c b/src/plugins/mactime/mactime.c
index 66df70b..a2219be 100644
--- a/src/plugins/mactime/mactime.c
+++ b/src/plugins/mactime/mactime.c
@@ -195,8 +195,8 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (dev, mm->devices,
-  ({
+  pool_foreach (dev, mm->devices)
+   {
     message_size = sizeof(*ep) + vec_len(dev->device_name) +
       vec_len(dev->ranges) * sizeof(ep->ranges[0]);
 
@@ -230,7 +230,7 @@
                       name_len);
     ep->device_name [ARRAY_LEN(ep->device_name) -1] = 0;
     vl_api_send_msg (rp, (u8 *)ep);
-  }));
+  }
   /* *INDENT-OFF* */
 
  send_reply:
@@ -578,10 +578,10 @@
     vlib_cli_output (vm, "Time now: %U", format_clib_timebase_time, now);
 
   /* *INDENT-OFF* */
-  pool_foreach (dp, mm->devices,
-  ({
+  pool_foreach (dp, mm->devices)
+   {
     vec_add1 (pool_indices, dp - mm->devices);
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "%-15s %18s %14s %10s %11s %13s",
diff --git a/src/plugins/mactime/mactime_test.c b/src/plugins/mactime/mactime_test.c
index b47cc21..67655cc 100644
--- a/src/plugins/mactime/mactime_test.c
+++ b/src/plugins/mactime/mactime_test.c
@@ -282,10 +282,10 @@
 
   fformat (vam->ofp, "%U", format_device, 0 /* header */ , 0 /* verbose */ );
   /* *INDENT-OFF* */
-  pool_foreach (dev, tm->devices,
-  ({
+  pool_foreach (dev, tm->devices)
+   {
     fformat (vam->ofp, "%U", format_device, dev, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 
   return ret;
diff --git a/src/plugins/mactime/mactime_top.c b/src/plugins/mactime/mactime_top.c
index 473cc5b..72d1964 100644
--- a/src/plugins/mactime/mactime_top.c
+++ b/src/plugins/mactime/mactime_top.c
@@ -196,10 +196,10 @@
 
   vec_reset_length (pool_indices);
   /* *INDENT-OFF* */
-  pool_foreach (dev, mm->devices,
-  ({
+  pool_foreach (dev, mm->devices)
+   {
     vec_add1 (pool_indices, dev->pool_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Nothing to do... */
@@ -445,10 +445,10 @@
 
   fformat (stdout, "%U", format_device, 0 /* header */ , 0 /* verbose */ );
   /* *INDENT-OFF* */
-  pool_foreach (dev, mm->devices,
-  ({
+  pool_foreach (dev, mm->devices)
+   {
     fformat (stdout, "%U", format_device, dev, 0 /* verbose */);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c
index 92d2337..938793c 100644
--- a/src/plugins/map/map.c
+++ b/src/plugins/map/map.c
@@ -980,8 +980,8 @@
   if (!unformat_user (input, unformat_line_input, line_input))
     {
       /* *INDENT-OFF* */
-      pool_foreach(d, mm->domains,
-	({vlib_cli_output(vm, "%U", format_map_domain, d, counters);}));
+      pool_foreach (d, mm->domains)
+	 {vlib_cli_output(vm, "%U", format_map_domain, d, counters);}
       /* *INDENT-ON* */
       return 0;
     }
@@ -1009,8 +1009,8 @@
   if (map_domain_index == ~0)
     {
       /* *INDENT-OFF* */
-      pool_foreach(d, mm->domains,
-	({vlib_cli_output(vm, "%U", format_map_domain, d, counters);}));
+      pool_foreach (d, mm->domains)
+	 {vlib_cli_output(vm, "%U", format_map_domain, d, counters);}
       /* *INDENT-ON* */
     }
   else
@@ -1063,14 +1063,14 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach(d, mm->domains, ({
+  pool_foreach (d, mm->domains)  {
     if (d->rules) {
       rulecount+= 0x1 << d->psid_length;
       rules += sizeof(ip6_address_t) * 0x1 << d->psid_length;
     }
     domains += sizeof(*d);
     domaincount++;
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "MAP domains structure: %d\n", sizeof (map_domain_t));
diff --git a/src/plugins/map/map_api.c b/src/plugins/map/map_api.c
index e65174e..4d2378a 100644
--- a/src/plugins/map/map_api.c
+++ b/src/plugins/map/map_api.c
@@ -137,10 +137,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(i, mm->domains,
-  ({
+  pool_foreach_index (i, mm->domains)
+   {
     send_domain_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/memif/cli.c b/src/plugins/memif/cli.c
index 00c947a..b313e97 100644
--- a/src/plugins/memif/cli.c
+++ b/src/plugins/memif/cli.c
@@ -461,9 +461,8 @@
   if (vec_len (hw_if_indices) == 0)
     {
       /* *INDENT-OFF* */
-      pool_foreach (mif, mm->interfaces,
+      pool_foreach (mif, mm->interfaces)
 	  vec_add1 (hw_if_indices, mif->hw_if_index);
-      );
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index 4deb46a..bf09509 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -557,8 +557,8 @@
 
       last_run_duration = start_time = vlib_time_now (vm);
       /* *INDENT-OFF* */
-      pool_foreach (mif, mm->interfaces,
-        ({
+      pool_foreach (mif, mm->interfaces)
+         {
 	  memif_socket_file_t * msf = vec_elt_at_index (mm->socket_files, mif->socket_file_index);
 	  /* Allow no more than 10us without a pause */
 	  now = vlib_time_now (vm);
@@ -607,7 +607,7 @@
                   sock = clib_mem_alloc (sizeof(clib_socket_t));
 	        }
 	    }
-        }));
+        }
       /* *INDENT-ON* */
       last_run_duration = vlib_time_now (vm) - last_run_duration;
     }
diff --git a/src/plugins/memif/memif_api.c b/src/plugins/memif/memif_api.c
index 00edc7a..a50e7ce 100644
--- a/src/plugins/memif/memif_api.c
+++ b/src/plugins/memif/memif_api.c
@@ -280,8 +280,8 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif, mm->interfaces,
-    ({
+  pool_foreach (mif, mm->interfaces)
+     {
       swif = vnet_get_sw_interface (vnm, mif->sw_if_index);
 
       if_name = format (if_name, "%U%c",
@@ -290,7 +290,7 @@
 
       send_memif_details (reg, mif, swif, if_name, mp->context);
       _vec_len (if_name) = 0;
-    }));
+    }
   /* *INDENT-ON* */
 
   vec_free (if_name);
diff --git a/src/plugins/nat/det44/det44.c b/src/plugins/nat/det44/det44.c
index 582fd20..1dbbfdf 100644
--- a/src/plugins/nat/det44/det44.c
+++ b/src/plugins/nat/det44/det44.c
@@ -151,12 +151,12 @@
 
   /* Add/del external address range to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces, ({
+  pool_foreach (i, dm->interfaces)  {
     if (det44_interface_is_inside(i))
       continue;
     det44_add_del_addr_to_fib(out_addr, out_plen, i->sw_if_index, is_add);
     goto out;
-  }));
+  }
   /* *INDENT-ON* */
 out:
   return 0;
@@ -204,13 +204,13 @@
   // then register nodes
 
   /* *INDENT-OFF* */
-  pool_foreach (tmp, dm->interfaces, ({
+  pool_foreach (tmp, dm->interfaces)  {
     if (tmp->sw_if_index == sw_if_index)
       {
         i = tmp;
         goto out;
       }
-  }));
+  }
   /* *INDENT-ON* */
 out:
 
@@ -302,10 +302,10 @@
       // add/del outside address to FIB
       snat_det_map_t *mp;
       /* *INDENT-OFF* */
-      pool_foreach (mp, dm->det_maps, ({
+      pool_foreach (mp, dm->det_maps)  {
         det44_add_del_addr_to_fib(&mp->out_addr,
                                   mp->out_plen, sw_if_index, !is_del);
-      }));
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -328,14 +328,14 @@
   vlib_process_get_events (vm, NULL);
   u32 now = (u32) vlib_time_now (vm);
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps, ({
+  pool_foreach (mp, dm->det_maps)  {
     vec_foreach(ses, mp->sessions)
       {
         /* Delete if session expired */
         if (ses->in_port && (ses->expire < now))
           snat_det_ses_close (mp, ses);
       }
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -429,10 +429,10 @@
   vec_free (interfaces);
 
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     vec_free (mp->sessions);
-  }));
+  }
   /* *INDENT-ON* */
 
   det44_reset_timeouts ();
@@ -468,15 +468,15 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces,
-    ({
+  pool_foreach (i, dm->interfaces)
+     {
       if (i->sw_if_index == sw_if_index)
         {
           if (!(det44_interface_is_outside (i)))
 	    return;
           match = 1;
         }
-    }));
+    }
   /* *INDENT-ON* */
 
   if (!match)
diff --git a/src/plugins/nat/det44/det44.h b/src/plugins/nat/det44/det44.h
index 84d570b..02b0fa7 100644
--- a/src/plugins/nat/det44/det44.h
+++ b/src/plugins/nat/det44/det44.h
@@ -279,11 +279,11 @@
   det44_main_t *dm = &det44_main;
   snat_det_map_t *mp;
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     if (is_addr_in_net(user_addr, &mp->in_addr, mp->in_plen))
       return mp;
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -294,11 +294,11 @@
   det44_main_t *dm = &det44_main;
   snat_det_map_t *mp;
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     if (is_addr_in_net(out_addr, &mp->out_addr, mp->out_plen))
       return mp;
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
diff --git a/src/plugins/nat/det44/det44_api.c b/src/plugins/nat/det44/det44_api.c
index 7c7b178..1486180 100644
--- a/src/plugins/nat/det44/det44_api.c
+++ b/src/plugins/nat/det44/det44_api.c
@@ -329,10 +329,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces,
-  ({
+  pool_foreach (i, dm->interfaces)
+   {
     det44_send_interface_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/nat/det44/det44_cli.c b/src/plugins/nat/det44/det44_cli.c
index 933784f..28569c7 100644
--- a/src/plugins/nat/det44/det44_cli.c
+++ b/src/plugins/nat/det44/det44_cli.c
@@ -75,8 +75,8 @@
   snat_det_map_t *mp;
   vlib_cli_output (vm, "NAT44 deterministic mappings:");
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     vlib_cli_output (vm, " in %U/%d out %U/%d\n",
                      format_ip4_address, &mp->in_addr, mp->in_plen,
                      format_ip4_address, &mp->out_addr, mp->out_plen);
@@ -85,7 +85,7 @@
     vlib_cli_output (vm, "  number of ports per inside host: %d\n",
                      mp->ports_per_host);
     vlib_cli_output (vm, "  sessions number: %d\n", mp->ses_num);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -188,8 +188,8 @@
   snat_det_map_t *mp;
   vlib_cli_output (vm, "NAT44 deterministic sessions:");
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     int i;
     vec_foreach_index (i, mp->sessions)
       {
@@ -197,7 +197,7 @@
         if (ses->in_port)
           vlib_cli_output (vm, "  %U", format_det_map_ses, mp, ses, &i);
       }
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -487,14 +487,14 @@
   det44_interface_t *i;
   vlib_cli_output (vm, "DET44 interfaces:");
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces,
-  ({
+  pool_foreach (i, dm->interfaces)
+   {
     vlib_cli_output (vm, " %U %s", format_vnet_sw_if_index_name, vnm,
                      i->sw_if_index,
                      (det44_interface_is_inside(i) &&
                       det44_interface_is_outside(i)) ? "in out" :
                      (det44_interface_is_inside(i) ? "in" : "out"));
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
diff --git a/src/plugins/nat/det44/det44_inlines.h b/src/plugins/nat/det44/det44_inlines.h
index e4be469..aeb55b3 100644
--- a/src/plugins/nat/det44/det44_inlines.h
+++ b/src/plugins/nat/det44/det44_inlines.h
@@ -108,11 +108,11 @@
 	{
 	  det44_interface_t *i;
           /* *INDENT-OFF* */
-          pool_foreach (i, dm->interfaces, ({
+          pool_foreach (i, dm->interfaces)  {
             /* NAT packet aimed at outside interface */
 	    if ((det44_interface_is_outside (i)) && (sw_if_index == i->sw_if_index))
               return 0;
-          }));
+          }
           /* *INDENT-ON* */
 	}
     }
diff --git a/src/plugins/nat/dslite/dslite_cli.c b/src/plugins/nat/dslite/dslite_cli.c
index 0819f95..25fcd01 100644
--- a/src/plugins/nat/dslite/dslite_cli.c
+++ b/src/plugins/nat/dslite/dslite_cli.c
@@ -287,10 +287,10 @@
   /* *INDENT-OFF* */
   vec_foreach (td, dm->per_thread_data)
     {
-      pool_foreach (b4, td->b4s,
-      ({
+      pool_foreach (b4, td->b4s)
+       {
         vlib_cli_output (vm, "%U", format_dslite_b4, td, b4);
-      }));
+      }
     }
   /* *INDENT-ON* */
 
diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c
index 85df078..309329f 100644
--- a/src/plugins/nat/in2out.c
+++ b/src/plugins/nat/in2out.c
@@ -171,11 +171,11 @@
     {
       /* hairpinning */
     /* *INDENT-OFF* */
-    pool_foreach (i, sm->output_feature_interfaces,
-    ({
+    pool_foreach (i, sm->output_feature_interfaces)
+     {
       if ((nat_interface_is_inside(i)) && (sw_if_index == i->sw_if_index))
         return 0;
-    }));
+    }
     /* *INDENT-ON* */
       return 1;
     }
diff --git a/src/plugins/nat/in2out_ed.c b/src/plugins/nat/in2out_ed.c
index d9a45dc..776efdf 100644
--- a/src/plugins/nat/in2out_ed.c
+++ b/src/plugins/nat/in2out_ed.c
@@ -627,11 +627,11 @@
 
       /* hairpinning */
       /* *INDENT-OFF* */
-      pool_foreach (i, sm->output_feature_interfaces,
-      ({
+      pool_foreach (i, sm->output_feature_interfaces)
+       {
         if ((nat_interface_is_inside (i)) && (rx_sw_if_index == i->sw_if_index))
            return 0;
-      }));
+      }
       /* *INDENT-ON* */
       return 1;
     }
@@ -826,7 +826,7 @@
       else
 	{
 	  /* *INDENT-OFF* */
-	  pool_foreach (s, tsm->sessions, {
+	  pool_foreach (s, tsm->sessions) {
       	    if (s->ext_host_addr.as_u32 == ip->dst_address.as_u32)
       	      {
       	        new_addr = ip->src_address.as_u32 = s->out2in.addr.as_u32;
@@ -837,7 +837,7 @@
 
       	        break;
       	      }
-      	  });
+      	  }
       	  /* *INDENT-ON* */
 
 	  for (i = 0; i < vec_len (sm->addresses); i++)
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 91f14d6..0694c34 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -730,22 +730,22 @@
 
   /* Add external address to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     if (nat_interface_is_inside(i) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(addr, 32, i->sw_if_index, 1);
     break;
-  }));
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  }
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     if (nat_interface_is_inside(i) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(addr, 32, i->sw_if_index, 1);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -756,15 +756,15 @@
 {
   snat_static_mapping_t *m;
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (is_addr_only_static_mapping (m) ||
           is_out2in_only_static_mapping (m) ||
           is_identity_static_mapping (m))
         continue;
       if (m->external_addr.as_u32 == addr.as_u32)
         return 1;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -882,7 +882,7 @@
   snat_session_t *s;
   u32 *indexes_to_free = NULL;
   /* *INDENT-OFF* */
-  pool_foreach (s, tsm->sessions, {
+  pool_foreach (s, tsm->sessions) {
     if (s->in2out.fib_index != fib_index ||
         s->in2out.addr.as_u32 != l_addr.as_u32)
       {
@@ -905,7 +905,7 @@
     vec_add1 (indexes_to_free, s - tsm->sessions);
     if (!addr_only)
       break;
-  });
+  }
   /* *INDENT-ON* */
   u32 *ses_index;
   vec_foreach (ses_index, indexes_to_free)
@@ -1031,11 +1031,11 @@
 	  if (is_identity_static_mapping (m))
 	    {
               /* *INDENT-OFF* */
-              pool_foreach (local, m->locals,
-              ({
+              pool_foreach (local, m->locals)
+               {
                 if (local->vrf_id == vrf_id)
                   return VNET_API_ERROR_VALUE_EXIST;
-              }));
+              }
               /* *INDENT-ON* */
 	      pool_get (m->locals, local);
 	      local->vrf_id = vrf_id;
@@ -1246,11 +1246,11 @@
 	    vrf_id = sm->inside_vrf_id;
 
           /* *INDENT-OFF* */
-          pool_foreach (local, m->locals,
-          ({
+          pool_foreach (local, m->locals)
+           {
 	    if (local->vrf_id == vrf_id)
               find = local - m->locals;
-	  }));
+	  }
           /* *INDENT-ON* */
 	  if (find == ~0)
 	    return VNET_API_ERROR_NO_SUCH_ENTRY;
@@ -1340,22 +1340,22 @@
 
   /* Add/delete external address to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (interface, sm->interfaces,
-  ({
+  pool_foreach (interface, sm->interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&e_addr, 32, interface->sw_if_index, is_add);
     break;
-  }));
-  pool_foreach (interface, sm->output_feature_interfaces,
-  ({
+  }
+  pool_foreach (interface, sm->output_feature_interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&e_addr, 32, interface->sw_if_index, is_add);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1544,8 +1544,8 @@
 	}
 
       /* *INDENT-OFF* */
-      pool_foreach (local, m->locals,
-      ({
+      pool_foreach (local, m->locals)
+      {
           fib_table_unlock (local->fib_index, FIB_PROTOCOL_IP4,
                             sm->fib_src_low);
           if (!out2in_only)
@@ -1570,7 +1570,7 @@
             tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);
 
           /* Delete sessions */
-          pool_foreach (s, tsm->sessions, {
+          pool_foreach (s, tsm->sessions) {
             if (!(is_lb_session (s)))
               continue;
 
@@ -1580,8 +1580,8 @@
 
             nat_free_session_data (sm, s, tsm - sm->per_thread_data, 0);
             nat_ed_session_delete (sm, s, tsm - sm->per_thread_data, 1);
-          });
-      }));
+          }
+      }
       /* *INDENT-ON* */
       if (m->affinity)
 	nat_affinity_flush_service (m->affinity_per_service_list_head_index);
@@ -1625,15 +1625,15 @@
     return VNET_API_ERROR_INVALID_VALUE;
 
   /* *INDENT-OFF* */
-  pool_foreach (local, m->locals,
-  ({
+  pool_foreach (local, m->locals)
+   {
     if ((local->addr.as_u32 == l_addr.as_u32) && (local->port == l_port) &&
         (local->vrf_id == vrf_id))
       {
         match_local = local;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_add)
@@ -1691,7 +1691,7 @@
 
       /* Delete sessions */
       /* *INDENT-OFF* */
-      pool_foreach (s, tsm->sessions, {
+      pool_foreach (s, tsm->sessions) {
         if (!(is_lb_session (s)))
           continue;
 
@@ -1701,7 +1701,7 @@
 
         nat_free_session_data (sm, s, tsm - sm->per_thread_data, 0);
         nat_ed_session_delete (sm, s, tsm - sm->per_thread_data, 1);
-      });
+      }
       /* *INDENT-ON* */
 
       pool_put (m->locals, match_local);
@@ -1710,8 +1710,8 @@
   vec_free (m->workers);
 
   /* *INDENT-OFF* */
-  pool_foreach (local, m->locals,
-  ({
+  pool_foreach (local, m->locals)
+   {
     vec_add1 (locals, local - m->locals);
     if (sm->num_workers > 1)
       {
@@ -1721,7 +1721,7 @@
                                   sm->worker_in2out_cb (&ip, local->fib_index, 0),
                                   1);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   ASSERT (vec_len (locals) > 1);
@@ -1779,8 +1779,8 @@
     {
       ip4_address_t pool_addr = { 0 };
       /* *INDENT-OFF* */
-      pool_foreach (m, sm->static_mappings,
-      ({
+      pool_foreach (m, sm->static_mappings)
+       {
           if (m->external_addr.as_u32 == addr.as_u32)
             (void) snat_add_static_mapping (m->local_addr, m->external_addr,
                                             m->local_port, m->external_port,
@@ -1792,7 +1792,7 @@
                                             m->tag,
                                             is_identity_static_mapping(m),
                                             pool_addr, 0);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -1814,13 +1814,13 @@
       vec_foreach (tsm, sm->per_thread_data)
       {
         /* *INDENT-OFF* */
-        pool_foreach (ses, tsm->sessions, ({
+        pool_foreach (ses, tsm->sessions)  {
           if (ses->out2in.addr.as_u32 == addr.as_u32)
             {
               nat_free_session_data (sm, ses, tsm - sm->per_thread_data, 0);
               vec_add1 (ses_to_be_removed, ses - tsm->sessions);
             }
-        }));
+        }
         /* *INDENT-ON* */
 
 	if (sm->endpoint_dependent)
@@ -1858,22 +1858,22 @@
 
   /* Delete external address from FIB */
   /* *INDENT-OFF* */
-  pool_foreach (interface, sm->interfaces,
-  ({
+  pool_foreach (interface, sm->interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&addr, 32, interface->sw_if_index, 0);
     break;
-  }));
-  pool_foreach (interface, sm->output_feature_interfaces,
-  ({
+  }
+  pool_foreach (interface, sm->output_feature_interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&addr, 32, interface->sw_if_index, 0);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1997,14 +1997,14 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         nat_log_err ("error interface already configured");
         return VNET_API_ERROR_VALUE_EXIST;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (sm->static_mapping_only && !(sm->static_mapping_connection_tracking))
@@ -2063,8 +2063,8 @@
 
 feature_set:
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         if (is_del)
@@ -2180,7 +2180,7 @@
 
         goto fib;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_del)
@@ -2226,13 +2226,13 @@
   vec_foreach (ap, sm->addresses)
     snat_add_del_addr_to_fib(&ap->addr, 32, sw_if_index, !is_del);
 
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
     if (!(is_addr_only_static_mapping(m)) || (m->local_addr.as_u32 == m->external_addr.as_u32))
       continue;
 
     snat_add_del_addr_to_fib(&m->external_addr, 32, sw_if_index, !is_del);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -2263,14 +2263,14 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         nat_log_err ("error interface already configured");
         return VNET_API_ERROR_VALUE_EXIST;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (sm->endpoint_dependent)
@@ -2403,8 +2403,8 @@
       vlib_frame_queue_main_init (sm->out2in_node_index, 0);
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         if (is_del)
@@ -2414,7 +2414,7 @@
 
         goto fib;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_del)
@@ -2441,13 +2441,13 @@
   vec_foreach (ap, sm->addresses)
     snat_add_del_addr_to_fib(&ap->addr, 32, sw_if_index, !is_del);
 
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
     if (!((is_addr_only_static_mapping(m)))  || (m->local_addr.as_u32 == m->external_addr.as_u32))
       continue;
 
     snat_add_del_addr_to_fib(&m->external_addr, 32, sw_if_index, !is_del);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -2499,25 +2499,25 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-    ({
+  pool_foreach (i, sm->interfaces)
+     {
       if (i->sw_if_index == sw_if_index)
         {
           if (!(nat_interface_is_outside (i)))
 	    return;
           match = 1;
         }
-    }));
+    }
 
-  pool_foreach (i, sm->output_feature_interfaces,
-    ({
+  pool_foreach (i, sm->output_feature_interfaces)
+     {
       if (i->sw_if_index == sw_if_index)
         {
           if (!(nat_interface_is_outside (i)))
 	    return;
           match = 1;
         }
-    }));
+    }
   /* *INDENT-ON* */
 
   if (!match)
@@ -3251,8 +3251,8 @@
 	    {
 	      u32 thread_index = vlib_get_thread_index ();
               /* *INDENT-OFF* */
-              pool_foreach_index (i, m->locals,
-              ({
+              pool_foreach_index (i, m->locals)
+               {
                 local = pool_elt_at_index (m->locals, i);
 
                 ip4_header_t ip = {
@@ -3264,17 +3264,17 @@
                   {
                     vec_add1 (tmp, i);
                   }
-              }));
+              }
               /* *INDENT-ON* */
 	      ASSERT (vec_len (tmp) != 0);
 	    }
 	  else
 	    {
               /* *INDENT-OFF* */
-              pool_foreach_index (i, m->locals,
-              ({
+              pool_foreach_index (i, m->locals)
+               {
                 vec_add1 (tmp, i);
-              }));
+              }
               /* *INDENT-ON* */
 	    }
 	  hi = vec_len (tmp) - 1;
diff --git a/src/plugins/nat/nat44_api.c b/src/plugins/nat/nat44_api.c
index 4600645..5bc4b4c 100644
--- a/src/plugins/nat/nat44_api.c
+++ b/src/plugins/nat/nat44_api.c
@@ -725,10 +725,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     send_nat44_interface_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -785,10 +785,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     send_nat44_interface_output_feature_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -982,11 +982,11 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (!is_identity_static_mapping(m) && !is_lb_static_mapping (m))
         send_nat44_static_mapping_details (m, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 
   for (j = 0; j < vec_len (sm->to_resolve); j++)
@@ -1104,16 +1104,16 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (is_identity_static_mapping(m) && !is_lb_static_mapping (m))
         {
-          pool_foreach_index (j, m->locals,
-          ({
+          pool_foreach_index (j, m->locals)
+           {
             send_nat44_identity_mapping_details (m, j, reg, mp->context);
-          }));
+          }
         }
-  }));
+  }
   /* *INDENT-ON* */
 
   for (j = 0; j < vec_len (sm->to_resolve); j++)
@@ -1251,7 +1251,7 @@
 {
   snat_session_t *s;
   /* *INDENT-OFF* */
-  pool_foreach (s, tsm->sessions, { nat_ed_user_create_helper (tsm, s); });
+  pool_foreach (s, tsm->sessions) { nat_ed_user_create_helper (tsm, s); }
   /* *INDENT-ON* */
 }
 
@@ -1286,10 +1286,10 @@
 	{
 	  nat_ed_users_create (tsm);
 	}
-      pool_foreach (u, tsm->users,
-      ({
+      pool_foreach (u, tsm->users)
+       {
         send_nat44_user_details (u, reg, mp->context);
-      }));
+      }
       if (sm->endpoint_dependent)
 	{
 	  nat_ed_users_destroy (tsm);
@@ -1407,12 +1407,12 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (s, tsm->sessions, {
+      pool_foreach (s, tsm->sessions) {
         if (s->in2out.addr.as_u32 == ukey.addr.as_u32)
           {
             send_nat44_user_session_details (s, reg, mp->context);
           }
-      });
+      }
       /* *INDENT-ON* */
     }
 }
@@ -1556,15 +1556,15 @@
 
   locals = (vl_api_nat44_lb_addr_port_t *) rmp->locals;
   /* *INDENT-OFF* */
-  pool_foreach (ap, m->locals,
-  ({
+  pool_foreach (ap, m->locals)
+   {
     clib_memcpy (locals->addr, &(ap->addr), 4);
     locals->port = ap->port;
     locals->probability = ap->probability;
     locals->vrf_id = ntohl (ap->vrf_id);
     locals++;
     local_num++;
-  }));
+  }
   /* *INDENT-ON* */
   rmp->local_num = ntohl (local_num);
 
@@ -1587,11 +1587,11 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (is_lb_static_mapping(m))
         send_nat44_lb_static_mapping_details (m, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1644,13 +1644,13 @@
       /* *INDENT-OFF* */
       vec_foreach (tsm, sm->per_thread_data)
       {
-        pool_foreach (s, tsm->sessions,
-        ({
+        pool_foreach (s, tsm->sessions)
+         {
           if (is_fwd_bypass_session(s))
             {
               vec_add1 (ses_to_be_removed, s - tsm->sessions);
             }
-        }));
+        }
 	if(sm->endpoint_dependent){
 	    vec_foreach (ses_index, ses_to_be_removed)
 	      {
diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c
index 2980764..ca396fd 100644
--- a/src/plugins/nat/nat44_cli.c
+++ b/src/plugins/nat/nat44_cli.c
@@ -773,8 +773,8 @@
       /* *INDENT-OFF* */
       vec_foreach (tsm, sm->per_thread_data)
         {
-          pool_foreach (s, tsm->sessions,
-          ({
+          pool_foreach (s, tsm->sessions)
+           {
             sess_timeout_time = s->last_heard +
 	      (f64) nat44_session_get_timeout (sm, s);
             if (now >= sess_timeout_time)
@@ -810,7 +810,7 @@
                 udp_sessions++;
                 break;
               }
-          }));
+          }
           nat44_show_lru_summary (vm, tsm, now, sess_timeout_time);
           count += pool_elts (tsm->sessions);
         }
@@ -820,8 +820,8 @@
     {
       tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);
       /* *INDENT-OFF* */
-      pool_foreach (s, tsm->sessions,
-      ({
+      pool_foreach (s, tsm->sessions)
+       {
         sess_timeout_time = s->last_heard +
 	    (f64) nat44_session_get_timeout (sm, s);
         if (now >= sess_timeout_time)
@@ -857,7 +857,7 @@
             udp_sessions++;
             break;
           }
-      }));
+      }
       /* *INDENT-ON* */
       nat44_show_lru_summary (vm, tsm, now, sess_timeout_time);
       count = pool_elts (tsm->sessions);
@@ -1037,24 +1037,24 @@
 
   vlib_cli_output (vm, "NAT44 interfaces:");
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     vlib_cli_output (vm, " %U %s", format_vnet_sw_if_index_name, vnm,
                      i->sw_if_index,
                      (nat_interface_is_inside(i) &&
                       nat_interface_is_outside(i)) ? "in out" :
                      (nat_interface_is_inside(i) ? "in" : "out"));
-  }));
+  }
 
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     vlib_cli_output (vm, " %U output-feature %s",
                      format_vnet_sw_if_index_name, vnm,
                      i->sw_if_index,
                      (nat_interface_is_inside(i) &&
                       nat_interface_is_outside(i)) ? "in out" :
                      (nat_interface_is_inside(i) ? "in" : "out"));
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1473,10 +1473,10 @@
 
   vlib_cli_output (vm, "NAT44 static mappings:");
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
     vlib_cli_output (vm, " %U", format_snat_static_mapping, m);
-  }));
+  }
   vec_foreach (rp, sm->to_resolve)
     vlib_cli_output (vm, " %U", format_snat_static_map_to_resolve, rp);
   /* *INDENT-ON* */
@@ -1611,18 +1611,18 @@
       if (!sm->endpoint_dependent)
         {
           snat_user_t *u;
-          pool_foreach (u, tsm->users,
-          ({
+          pool_foreach (u, tsm->users)
+           {
             vlib_cli_output (vm, "  %U", format_snat_user, tsm, u, detail);
-          }));
+          }
         }
       else
         {
           snat_session_t *s;
-          pool_foreach (s, tsm->sessions,
-          ({
+          pool_foreach (s, tsm->sessions)
+           {
             vlib_cli_output (vm, "  %U\n", format_snat_session, tsm, s);
-          }));
+          }
         }
     }
   /* *INDENT-ON* */
diff --git a/src/plugins/nat/nat44_hairpinning.c b/src/plugins/nat/nat44_hairpinning.c
index 2859046..9432f55 100644
--- a/src/plugins/nat/nat44_hairpinning.c
+++ b/src/plugins/nat/nat44_hairpinning.c
@@ -746,8 +746,8 @@
 	  vnet_feature_next (&next0, b0);
 
           /* *INDENT-OFF* */
-          pool_foreach (i, sm->output_feature_interfaces,
-          ({
+          pool_foreach (i, sm->output_feature_interfaces)
+           {
             /* Only packets from NAT inside interface */
             if ((nat_interface_is_inside(i)) && (sw_if_index0 == i->sw_if_index))
               {
@@ -761,7 +761,7 @@
                   }
                 break;
               }
-          }));
+          }
           /* *INDENT-ON* */
 
 	  if (next0 != SNAT_HAIRPIN_SRC_NEXT_DROP)
diff --git a/src/plugins/nat/nat64/nat64.c b/src/plugins/nat/nat64/nat64.c
index 240f3ef..ae7bb35 100644
--- a/src/plugins/nat/nat64/nat64.c
+++ b/src/plugins/nat/nat64/nat64.c
@@ -423,14 +423,14 @@
 
   /* Add/del external address to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (interface, nm->interfaces,
-  ({
+  pool_foreach (interface, nm->interfaces)
+   {
     if (nat64_interface_is_inside(interface))
       continue;
 
     nat64_add_del_addr_to_fib (addr, 32, interface->sw_if_index, is_add);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -547,14 +547,14 @@
 
   /* Check if interface already exists */
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         interface = i;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_add)
@@ -642,11 +642,11 @@
   nat64_interface_t *i = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (fn (i, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -823,8 +823,8 @@
   ip46_address_t addr;
 
   /* *INDENT-OFF* */
-  pool_foreach (static_bib, nm->static_bibs,
-  ({
+  pool_foreach (static_bib, nm->static_bibs)
+   {
     if ((static_bib->thread_index != thread_index) || (static_bib->done))
       continue;
 
@@ -858,7 +858,7 @@
       }
 
       static_bib->done = 1;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -978,11 +978,11 @@
   if (nm->num_workers)
     {
       /* *INDENT-OFF* */
-      pool_foreach (static_bib, nm->static_bibs,
-      ({
+      pool_foreach (static_bib, nm->static_bibs)
+       {
         if (static_bib->done)
           vec_add1 (to_be_free, static_bib - nm->static_bibs);
-      }));
+      }
       vec_foreach (index, to_be_free)
         pool_put_index (nm->static_bibs, index[0]);
       /* *INDENT-ON* */
@@ -1567,10 +1567,10 @@
   nm->enabled = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     vec_add1 (interfaces, *i);
-  }));
+  }
   /* *INDENT-ON* */
   vec_foreach (i, interfaces)
   {
diff --git a/src/plugins/nat/nat64/nat64_db.c b/src/plugins/nat/nat64/nat64_db.c
index 49909fd..82ef70d 100644
--- a/src/plugins/nat/nat64/nat64_db.c
+++ b/src/plugins/nat/nat64/nat64_db.c
@@ -177,11 +177,11 @@
   /* delete ST entries for static BIB entry */
   if (bibe->is_static)
     {
-      pool_foreach (ste, st, (
-			       {
-			       if (ste->bibe_index == bibe_index)
-			       vec_add1 (ste_to_be_free, ste - st);}
-		    ));
+      pool_foreach (ste, st)
+      {
+	if (ste->bibe_index == bibe_index)
+	  vec_add1 (ste_to_be_free, ste - st);
+      }
       vec_foreach (ste_index, ste_to_be_free)
 	nat64_db_st_entry_free (thread_index, db,
 				pool_elt_at_index (st, ste_index[0]));
@@ -274,17 +274,17 @@
     /* *INDENT-OFF* */
     #define _(N, i, n, s) \
       bib = db->bib._##n##_bib; \
-      pool_foreach (bibe, bib, ({ \
+      pool_foreach (bibe, bib)  { \
         if (fn (bibe, ctx)) \
           return; \
-      }));
+      }
       foreach_nat_protocol
     #undef _
       bib = db->bib._unk_proto_bib;
-      pool_foreach (bibe, bib, ({
+      pool_foreach (bibe, bib)  {
         if (fn (bibe, ctx))
           return;
-      }));
+      }
     /* *INDENT-ON* */
     }
   else
@@ -305,11 +305,11 @@
 	}
 
       /* *INDENT-OFF* */
-      pool_foreach (bibe, bib,
-      ({
+      pool_foreach (bibe, bib)
+       {
         if (fn (bibe, ctx))
           return;
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
@@ -348,17 +348,17 @@
     /* *INDENT-OFF* */
     #define _(N, i, n, s) \
       st = db->st._##n##_st; \
-      pool_foreach (ste, st, ({ \
+      pool_foreach (ste, st)  { \
         if (fn (ste, ctx)) \
           return; \
-      }));
+      }
       foreach_nat_protocol
     #undef _
       st = db->st._unk_proto_st;
-      pool_foreach (ste, st, ({
+      pool_foreach (ste, st)  {
         if (fn (ste, ctx))
           return;
-      }));
+      }
     /* *INDENT-ON* */
     }
   else
@@ -379,11 +379,11 @@
 	}
 
       /* *INDENT-OFF* */
-      pool_foreach (ste, st,
-      ({
+      pool_foreach (ste, st)
+       {
         if (fn (ste, ctx))
           return;
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
@@ -670,12 +670,12 @@
 /* *INDENT-OFF* */
 #define _(N, i, n, s) \
   st = db->st._##n##_st; \
-  pool_foreach (ste, st, ({\
+  pool_foreach (ste, st) {\
     if (i == NAT_PROTOCOL_TCP && !ste->tcp_state) \
       continue; \
     if (ste->expire < now) \
       vec_add1 (ste_to_be_free, ste - st); \
-  })); \
+  } \
   vec_foreach (ste_index, ste_to_be_free) \
     nat64_db_st_entry_free (thread_index, db, \
                             pool_elt_at_index(st, ste_index[0])); \
@@ -684,10 +684,10 @@
   foreach_nat_protocol
 #undef _
   st = db->st._unk_proto_st;
-  pool_foreach (ste, st, ({
+  pool_foreach (ste, st)  {
     if (ste->expire < now)
       vec_add1 (ste_to_be_free, ste - st);
-  }));
+  }
   vec_foreach (ste_index, ste_to_be_free)
     nat64_db_st_entry_free (thread_index, db,
                             pool_elt_at_index(st, ste_index[0]));
@@ -707,11 +707,11 @@
 /* *INDENT-OFF* */
 #define _(N, i, n, s) \
   st = db->st._##n##_st; \
-  pool_foreach (ste, st, ({ \
+  pool_foreach (ste, st) { \
     bibe = pool_elt_at_index (db->bib._##n##_bib, ste->bibe_index); \
     if (bibe->out_addr.as_u32 == out_addr->as_u32) \
       vec_add1 (ste_to_be_free, ste - st); \
-  })); \
+  } \
   vec_foreach (ste_index, ste_to_be_free) \
     nat64_db_st_entry_free (thread_index, db, \
                             pool_elt_at_index(st, ste_index[0])); \
@@ -720,11 +720,11 @@
   foreach_nat_protocol
 #undef _
   st = db->st._unk_proto_st;
-  pool_foreach (ste, st, ({
+  pool_foreach (ste, st)  {
     bibe = pool_elt_at_index (db->bib._unk_proto_bib, ste->bibe_index);
     if (bibe->out_addr.as_u32 == out_addr->as_u32)
       vec_add1 (ste_to_be_free, ste - st);
-  }));
+  }
   vec_foreach (ste_index, ste_to_be_free)
     nat64_db_st_entry_free (thread_index, db,
                             pool_elt_at_index(st, ste_index[0]));
diff --git a/src/plugins/nat/nat66/nat66.c b/src/plugins/nat/nat66/nat66.c
index 0a90f73..a8de3f6 100644
--- a/src/plugins/nat/nat66/nat66.c
+++ b/src/plugins/nat/nat66/nat66.c
@@ -94,14 +94,14 @@
   const char *feature_name;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         interface = i;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_add)
@@ -139,11 +139,11 @@
   nat66_interface_t *i = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (fn (i, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -257,11 +257,11 @@
   nat66_static_mapping_t *sm = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (sm, nm->sm,
-  ({
+  pool_foreach (sm, nm->sm)
+   {
     if (fn (sm, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/nat/nat66/nat66_in2out.c b/src/plugins/nat/nat66/nat66_in2out.c
index 4c4d3ab..356100f 100644
--- a/src/plugins/nat/nat66/nat66_in2out.c
+++ b/src/plugins/nat/nat66/nat66_in2out.c
@@ -95,12 +95,12 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     /* NAT packet aimed at outside interface */
     if (nat66_interface_is_outside (i) && sw_if_index == i->sw_if_index)
       return 0;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 1;
diff --git a/src/plugins/nat/nat_format.c b/src/plugins/nat/nat_format.c
index f0e7a5d..90faeb9 100644
--- a/src/plugins/nat/nat_format.c
+++ b/src/plugins/nat/nat_format.c
@@ -234,10 +234,10 @@
 		    clib_net_to_host_u16 (m->local_port));
 
       /* *INDENT-OFF* */
-      pool_foreach (local, m->locals,
-      ({
+      pool_foreach (local, m->locals)
+       {
         s = format (s, " vrf %d", local->vrf_id);
-      }));
+      }
       /* *INDENT-ON* */
 
       return s;
@@ -264,13 +264,13 @@
 		      is_out2in_only_static_mapping (m) ? "out2in-only" : "");
 
           /* *INDENT-OFF* */
-          pool_foreach (local, m->locals,
-          ({
+          pool_foreach (local, m->locals)
+           {
 	    s = format (s, "\n  local %U:%d vrf %d probability %d\%",
 			format_ip4_address, &local->addr,
                         clib_net_to_host_u16 (local->port),
 			local->vrf_id, local->probability);
-          }));
+          }
           /* *INDENT-ON* */
 
 	}
diff --git a/src/plugins/nat/nat_inlines.h b/src/plugins/nat/nat_inlines.h
index 3d0f5ba..ccb9cdf 100644
--- a/src/plugins/nat/nat_inlines.h
+++ b/src/plugins/nat/nat_inlines.h
@@ -713,11 +713,11 @@
 
       snat_interface_t *i;
       /* *INDENT-OFF* */
-      pool_foreach (i, sm->interfaces, ({
+      pool_foreach (i, sm->interfaces)  {
         /* NAT packet aimed at outside interface */
 	if ((nat_interface_is_outside (i)) && (sw_if_index == i->sw_if_index))
           return 0;
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c
index 57e5e6c..63e6a98 100644
--- a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c
+++ b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c
@@ -64,11 +64,11 @@
   vnet_main_t *vnm = vnet_get_main ();
   vnet_interface_main_t *im = &vnm->interface_main;
 
-  pool_foreach (si, im->sw_interfaces, (
+  pool_foreach (si, im->sw_interfaces)
 					 {
 					 nsh_md2_ioam_set_clear_output_feature_on_intf
 					 (vm, si->sw_if_index, 0);
-					 }));
+					 }
   return;
 }
 
@@ -305,7 +305,7 @@
   i = vec_len (hm->bool_ref_by_sw_if_index);
   vec_free (hm->bool_ref_by_sw_if_index);
   vec_validate_init_empty (hm->bool_ref_by_sw_if_index, i, ~0);
-  pool_foreach (t, hm->dst_tunnels, (
+  pool_foreach (t, hm->dst_tunnels)
 				      {
 				      nsh_md2_ioam_enable_disable_for_dest
 				      (gm->vlib_main,
@@ -315,7 +315,6 @@
 				       /* is_add */
 				      );
 				      }
-		));
   return;
 }
 
@@ -382,7 +381,7 @@
       return 0;
     }
 
-  pool_foreach (t, hm->dst_tunnels, (
+  pool_foreach (t, hm->dst_tunnels)
 				      {
 				      nsh_md2_ioam_enable_disable_for_dest
 				      (gm->vlib_main,
@@ -391,7 +390,6 @@
 				       (t->fp_proto ==
 					FIB_PROTOCOL_IP4), 1 /* is_add */ );
 				      }
-		));
   nsh_md2_ioam_clear_output_feature_on_select_intfs ();
   return (0);
 
diff --git a/src/plugins/nsh/nsh_api.c b/src/plugins/nsh/nsh_api.c
index 2f40f31..143285e 100644
--- a/src/plugins/nsh/nsh_api.c
+++ b/src/plugins/nsh/nsh_api.c
@@ -189,12 +189,10 @@
 
   if (~0 == map_index)
     {
-      pool_foreach (t, nm->nsh_mappings, (
-					   {
-					   send_nsh_map_details (t, rp,
-								 mp->context);
-					   }
-		    ));
+      pool_foreach (t, nm->nsh_mappings)
+      {
+	send_nsh_map_details (t, rp, mp->context);
+      }
     }
   else
     {
@@ -652,12 +650,10 @@
 
   if (~0 == entry_index)
     {
-      pool_foreach (t, nm->nsh_entries, (
-					  {
-					  send_nsh_entry_details (t, rp,
-								  mp->context);
-					  }
-		    ));
+      pool_foreach (t, nm->nsh_entries)
+      {
+	send_nsh_entry_details (t, rp, mp->context);
+      }
     }
   else
     {
diff --git a/src/plugins/nsh/nsh_cli.c b/src/plugins/nsh/nsh_cli.c
index 8bebb72..7bcaf1c 100644
--- a/src/plugins/nsh/nsh_cli.c
+++ b/src/plugins/nsh/nsh_cli.c
@@ -141,13 +141,13 @@
   adj_index_t ai = ~0;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(ai, adj_pool,
-  ({
+  pool_foreach_index (ai, adj_pool)
+   {
       if (sw_if_index == adj_get_sw_if_index(ai))
       {
         return ai;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return ~0;
@@ -314,13 +314,10 @@
   if (pool_elts (nm->nsh_mappings) == 0)
     vlib_cli_output (vm, "No nsh maps configured.");
 
-  pool_foreach (map, nm->nsh_mappings, (
-					 {
-					 vlib_cli_output (vm, "%U",
-							  format_nsh_map,
-							  map);
-					 }
-		));
+  pool_foreach (map, nm->nsh_mappings)
+  {
+    vlib_cli_output (vm, "%U", format_nsh_map, map);
+  }
 
   return 0;
 }
@@ -615,16 +612,11 @@
   if (pool_elts (nm->nsh_entries) == 0)
     vlib_cli_output (vm, "No nsh entries configured.");
 
-  pool_foreach (nsh_entry, nm->nsh_entries, (
-					      {
-					      vlib_cli_output (vm, "%U",
-							       format_nsh_header,
-							       nsh_entry->rewrite);
-					      vlib_cli_output (vm,
-							       "  rewrite_size: %d bytes",
-							       nsh_entry->rewrite_size);
-					      }
-		));
+  pool_foreach (nsh_entry, nm->nsh_entries)
+  {
+    vlib_cli_output (vm, "%U", format_nsh_header, nsh_entry->rewrite);
+    vlib_cli_output (vm, "  rewrite_size: %d bytes", nsh_entry->rewrite_size);
+  }
 
   return 0;
 }
diff --git a/src/plugins/perfmon/perfmon.c b/src/plugins/perfmon/perfmon.c
index 525a864..28d2f45 100644
--- a/src/plugins/perfmon/perfmon.c
+++ b/src/plugins/perfmon/perfmon.c
@@ -553,10 +553,10 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (c, pm->capture_pool,
-  ({
+  pool_foreach (c, pm->capture_pool)
+   {
     vec_add1 (captures, *c);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_sort_with_function (captures, capture_name_sort);
diff --git a/src/plugins/pppoe/pppoe.c b/src/plugins/pppoe/pppoe.c
index 5ad8269..1589725 100644
--- a/src/plugins/pppoe/pppoe.c
+++ b/src/plugins/pppoe/pppoe.c
@@ -632,10 +632,10 @@
   if (pool_elts (pem->sessions) == 0)
     vlib_cli_output (vm, "No pppoe sessions configured...");
 
-  pool_foreach (t, pem->sessions,
-		({
+  pool_foreach (t, pem->sessions)
+		 {
 		    vlib_cli_output (vm, "%U",format_pppoe_session, t);
-		}));
+		}
 
   return 0;
 }
diff --git a/src/plugins/pppoe/pppoe_api.c b/src/plugins/pppoe/pppoe_api.c
index 6da66c8..6705fb6 100644
--- a/src/plugins/pppoe/pppoe_api.c
+++ b/src/plugins/pppoe/pppoe_api.c
@@ -121,10 +121,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, pem->sessions,
-      ({
+      pool_foreach (t, pem->sessions)
+       {
         send_pppoe_session_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 87a61cc..7f879cc 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -131,13 +131,13 @@
   for (i = 0; i < num_threads; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool, ({
+      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool)  {
 	if (crctx->ckpair_index == ckpair->cert_key_index)
 	  {
 	    quic_crypto_context_make_key_from_crctx (&kv, crctx);
 	    clib_bihash_add_del_24_8 (&qm->wrk_ctx[i].crypto_context_hash, &kv, 0 /* is_add */ );
 	  }
-      }));
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -179,9 +179,9 @@
   for (i = 0; i < num_threads; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool, ({
+      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool)  {
 	vlib_cli_output (vm, "[%d][Q]%U", i, format_crypto_context, crctx);
-      }));
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -2647,8 +2647,8 @@
   for (i = 0; i < num_workers + 1; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (ctx, qm->ctx_pool[i],
-      ({
+      pool_foreach (ctx, qm->ctx_pool[i])
+       {
 	if (quic_ctx_is_conn (ctx) && ctx->conn)
 	  {
 	    quicly_get_stats (ctx->conn, &st);
@@ -2665,7 +2665,7 @@
 	  }
 	else if (quic_ctx_is_stream (ctx))
 	  nstream++;
-      }));
+      }
       /* *INDENT-ON* */
     }
   vlib_cli_output (vm, "-------- Connections --------");
@@ -2822,15 +2822,15 @@
   for (int i = 0; i < num_workers + 1; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (ctx, qm->ctx_pool[i],
-      ({
+      pool_foreach (ctx, qm->ctx_pool[i])
+       {
         if (quic_ctx_is_stream (ctx) && show_stream)
           vlib_cli_output (vm, "%U", quic_format_stream_ctx, ctx);
         else if (quic_ctx_is_listener (ctx) && show_listeners)
           vlib_cli_output (vm, "%U", quic_format_listener_ctx, ctx);
 	else if (quic_ctx_is_conn (ctx) && show_conn)
           vlib_cli_output (vm, "%U", quic_format_connection_ctx, ctx);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/plugins/stn/stn.c b/src/plugins/stn/stn.c
index 760061f..241f716 100644
--- a/src/plugins/stn/stn.c
+++ b/src/plugins/stn/stn.c
@@ -378,9 +378,9 @@
   stn_main_t *stn = &stn_main;
   u8 *s = 0;
   stn_rule_t *rule;
-  pool_foreach(rule, stn->rules, {
+  pool_foreach (rule, stn->rules) {
       s = format (s, "- %U\n", format_stn_rule, rule);
-  });
+  }
 
   vlib_cli_output(vm, "%v", s);
 
diff --git a/src/plugins/stn/stn_api.c b/src/plugins/stn/stn_api.c
index 818c4a6..e868593 100644
--- a/src/plugins/stn/stn_api.c
+++ b/src/plugins/stn/stn_api.c
@@ -85,9 +85,9 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (r, stn->rules,({
+  pool_foreach (r, stn->rules) {
     send_stn_rules_details (r, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/tracedump/tracedump.c b/src/plugins/tracedump/tracedump.c
index 5347f82..53dc1a9 100644
--- a/src/plugins/tracedump/tracedump.c
+++ b/src/plugins/tracedump/tracedump.c
@@ -248,10 +248,10 @@
         /* Filter as directed */
         trace_apply_filter(this_vlib_main);
 
-        pool_foreach (th, tm->trace_buffer_pool,
-        ({
+        pool_foreach (th, tm->trace_buffer_pool)
+         {
           vec_add1 (client_trace_cache[i], th[0]);
-        }));
+        }
 
         /* Sort them by increasing time. */
         if (vec_len (client_trace_cache[i]))
diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c
index ad66e76..71342bd 100644
--- a/src/plugins/vmxnet3/cli.c
+++ b/src/plugins/vmxnet3/cli.c
@@ -556,9 +556,8 @@
 
   if (vec_len (hw_if_indices) == 0)
     {
-      pool_foreach (vd, vmxm->devices,
-		    vec_add1 (hw_if_indices, vd->hw_if_index);
-	);
+      pool_foreach (vd, vmxm->devices)
+	vec_add1 (hw_if_indices, vd->hw_if_index);
     }
 
   show_vmxnet3 (vm, hw_if_indices, show_descr, show_one_table, which,
diff --git a/src/plugins/vmxnet3/vmxnet3.c b/src/plugins/vmxnet3/vmxnet3.c
index ec0ab2b..8ec10cd 100644
--- a/src/plugins/vmxnet3/vmxnet3.c
+++ b/src/plugins/vmxnet3/vmxnet3.c
@@ -661,7 +661,7 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (vd, vmxm->devices, ({
+  pool_foreach (vd, vmxm->devices)  {
     if (vd->pci_addr.as_u32 == args->addr.as_u32)
       {
 	args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -672,7 +672,7 @@
 		  format_vlib_pci_addr, &args->addr, "pci address in use");
 	return;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (args->bind)
diff --git a/src/plugins/vmxnet3/vmxnet3_api.c b/src/plugins/vmxnet3/vmxnet3_api.c
index decb7b6..cef0770 100644
--- a/src/plugins/vmxnet3/vmxnet3_api.c
+++ b/src/plugins/vmxnet3/vmxnet3_api.c
@@ -174,14 +174,14 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (vd, vmxm->devices,
-    ({
+  pool_foreach (vd, vmxm->devices)
+     {
       swif = vnet_get_sw_interface (vnm, vd->sw_if_index);
       if_name = format (if_name, "%U%c", format_vnet_sw_interface_name, vnm,
 			swif, 0);
       send_vmxnet3_details (reg, vd, swif, if_name, mp->context);
       _vec_len (if_name) = 0;
-    }));
+    }
   /* *INDENT-ON* */
 
   vec_free (if_name);
@@ -212,8 +212,8 @@
     goto bad_sw_if_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (vd, vmxm->devices,
-    ({
+  pool_foreach (vd, vmxm->devices)
+     {
       if ((filter_sw_if_index == ~0) ||
 	  (vd->sw_if_index == filter_sw_if_index))
 	{
@@ -223,7 +223,7 @@
 	  send_vmxnet3_details (reg, vd, swif, if_name, mp->context);
 	  _vec_len (if_name) = 0;
 	}
-    }));
+    }
   /* *INDENT-ON* */
 
   BAD_SW_IF_INDEX_LABEL;
diff --git a/src/plugins/vrrp/vrrp.c b/src/plugins/vrrp/vrrp.c
index 771cd70..5ee011c 100644
--- a/src/plugins/vrrp/vrrp.c
+++ b/src/plugins/vrrp/vrrp.c
@@ -423,11 +423,11 @@
   fib_index = mfib_table_get_index_for_sw_if_index (proto, sw_if_index);
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vrm->vrs,
-  ({
+  pool_foreach (vr, vrm->vrs)
+   {
     if (vrrp_vr_is_ipv6 (vr) == is_ipv6)
       n_vrs++;
-  }));
+  }
   /* *INDENT-ON* */
 
   if (enable)
diff --git a/src/plugins/vrrp/vrrp_api.c b/src/plugins/vrrp/vrrp_api.c
index 27ca56a..9a206fa 100644
--- a/src/plugins/vrrp/vrrp_api.c
+++ b/src/plugins/vrrp/vrrp_api.c
@@ -216,14 +216,14 @@
   sw_if_index = htonl (mp->sw_if_index);
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vmp->vrs, ({
+  pool_foreach (vr, vmp->vrs)  {
 
     if (sw_if_index && (sw_if_index != ~0) &&
 	(sw_if_index != vr->config.sw_if_index))
       continue;
 
     send_vrrp_vr_details (vr, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -364,14 +364,14 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vmp->vrs, ({
+  pool_foreach (vr, vmp->vrs)  {
 
     if (!vec_len (vr->config.peer_addrs))
       continue;
 
     send_vrrp_vr_details (vr, reg, mp->context);
 
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -468,14 +468,14 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vmp->vrs, ({
+  pool_foreach (vr, vmp->vrs)  {
 
     if (!vec_len (vr->tracking.interfaces))
       continue;
 
     send_vrrp_vr_track_if_details (vr, reg, mp->context);
 
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -511,12 +511,12 @@
   vl_api_registration_t *vl_reg;
 
   /* *INDENT-OFF* */
-  pool_foreach(reg, vam->vrrp_vr_events_registrations,
-  ({
+  pool_foreach (reg, vam->vrrp_vr_events_registrations)
+   {
     vl_reg = vl_api_client_index_to_registration (reg->client_index);
     if (vl_reg)
       send_vrrp_vr_event (reg, vl_reg, vr, new_state);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/vrrp/vrrp_cli.c b/src/plugins/vrrp/vrrp_cli.c
index 447b474..a154a11 100644
--- a/src/plugins/vrrp/vrrp_cli.c
+++ b/src/plugins/vrrp/vrrp_cli.c
@@ -196,15 +196,14 @@
 	break;
     }
 
-  pool_foreach (vr, vmp->vrs, (
-				{
+  pool_foreach (vr, vmp->vrs)
+  {
 
-				if (sw_if_index && (sw_if_index != ~0) &&
-				    (sw_if_index != vr->config.sw_if_index))
-				continue;
-				vlib_cli_output (vm, "%U", format_vrrp_vr,
-						 vr);}
-		));
+    if (sw_if_index && (sw_if_index != ~0) &&
+	(sw_if_index != vr->config.sw_if_index))
+      continue;
+    vlib_cli_output (vm, "%U", format_vrrp_vr, vr);
+  }
 
   return 0;
 }
diff --git a/src/plugins/wireguard/wireguard_if.c b/src/plugins/wireguard/wireguard_if.c
index 3c59407..f7eb5a1 100644
--- a/src/plugins/wireguard/wireguard_if.c
+++ b/src/plugins/wireguard/wireguard_if.c
@@ -373,11 +373,11 @@
   index_t wgii;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (wgii, wg_if_pool,
+  pool_foreach_index (wgii, wg_if_pool)
   {
     if (WALK_STOP == fn(wgii, data))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/plugins/wireguard/wireguard_peer.c b/src/plugins/wireguard/wireguard_peer.c
old mode 100755
new mode 100644
index 147adbf..c4f06be
--- a/src/plugins/wireguard/wireguard_peer.c
+++ b/src/plugins/wireguard/wireguard_peer.c
@@ -290,13 +290,13 @@
     return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
 
   /* *INDENT-OFF* */
-  pool_foreach (peer, wg_peer_pool,
-  ({
+  pool_foreach (peer, wg_peer_pool)
+   {
     if (!memcmp (peer->remote.r_public, public_key, NOISE_PUBLIC_KEY_LEN))
     {
       return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
     }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (pool_elts (wg_peer_pool) > MAX_PEERS)
@@ -362,11 +362,11 @@
   index_t peeri;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(peeri, wg_peer_pool,
+  pool_foreach_index (peeri, wg_peer_pool)
   {
     if (WALK_STOP == fn(peeri, data))
       return peeri;
-  });
+  }
   /* *INDENT-ON* */
   return INDEX_INVALID;
 }
diff --git a/src/svm/svm.c b/src/svm/svm.c
index c087655..2834524 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -1288,10 +1288,10 @@
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
diff --git a/src/svm/svmtool.c b/src/svm/svmtool.c
index 0f38d7f..61f8372 100644
--- a/src/svm/svmtool.c
+++ b/src/svm/svmtool.c
@@ -73,10 +73,10 @@
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
@@ -328,10 +328,10 @@
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 73e44ba..0f2412b 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -279,9 +279,9 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (ldpw, ldp->workers, ({
+  pool_foreach (ldpw, ldp->workers)  {
     clib_memset (&ldpw->clib_time, 0, sizeof (ldpw->clib_time));
-  }));
+  }
   /* *INDENT-ON* */
 
   LDBG (0, "LDP initialization: done!");
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index d56a209..5beaecd 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -739,7 +739,7 @@
   vcl_locked_session_t *vls, *parent_vls;
 
   /* *INDENT-OFF* */
-  pool_foreach (vls, vls_wrk->vls_pool, ({
+  pool_foreach (vls, vls_wrk->vls_pool)  {
     /* Initialize sharing on parent session */
     if (vls->shared_data_index == ~0)
       {
@@ -748,7 +748,7 @@
 	vls->shared_data_index = parent_vls->shared_data_index;
       }
     vls_share_session (vls_wrk, vls);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1380,11 +1380,11 @@
   is_current = current_wrk == wrk->wrk_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (s, wrk->sessions, ({
+  pool_foreach (s, wrk->sessions)  {
     vls = vls_get (vls_si_wi_to_vlsh (s->session_index, wrk->wrk_index));
     if (vls && (is_current || vls_is_shared_by_wrk (vls, current_wrk)))
       vls_unshare_session (vls, wrk);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 9c99f66..abad979 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -1284,10 +1284,10 @@
   current_wrk = vcl_worker_get_current ();
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk, vcm->workers, ({
+  pool_foreach (wrk, vcm->workers)  {
     if (current_wrk != wrk)
       vcl_worker_cleanup (wrk, 0 /* notify vpp */ );
-  }));
+  }
   /* *INDENT-ON* */
 
   vcl_api_detach (current_wrk);
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index c6f71a5..db82ded 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -1077,11 +1077,11 @@
 
   /* Close all known open files */
   /* *INDENT-OFF* */
-  pool_foreach(f, fm->file_pool,
-    ({
+  pool_foreach (f, fm->file_pool)
+     {
       if (f->file_descriptor > 2)
         close(f->file_descriptor);
-    }));
+    }
   /* *INDENT-ON* */
 
   /* Exec ourself */
diff --git a/src/vlib/node.c b/src/vlib/node.c
index 2c48643..387b774 100644
--- a/src/vlib/node.c
+++ b/src/vlib/node.c
@@ -130,10 +130,10 @@
 	  pf->next_frame_index += n_insert;
       }
       /* *INDENT-OFF* */
-      pool_foreach (pf, nm->suspended_process_frames, ({
+      pool_foreach (pf, nm->suspended_process_frames)  {
 	  if (pf->next_frame_index != ~0 && pf->next_frame_index >= i)
 	    pf->next_frame_index += n_insert;
-      }));
+      }
       /* *INDENT-ON* */
 
       r->n_next_nodes = vec_len (node->next_nodes);
diff --git a/src/vlib/trace.c b/src/vlib/trace.c
index f90f275..1527444 100644
--- a/src/vlib/trace.c
+++ b/src/vlib/trace.c
@@ -258,15 +258,15 @@
    */
   n_accepted = 0;
   /* *INDENT-OFF* */
-  pool_foreach (h, tm->trace_buffer_pool,
-   ({
+  pool_foreach (h, tm->trace_buffer_pool)
+    {
       accept = filter_accept(tm, h[0]);
 
       if ((n_accepted == tm->filter_count) || !accept)
           vec_add1 (traces_to_remove, h);
       else
           n_accepted++;
-  }));
+  }
   /* *INDENT-ON* */
 
   /* remove all traces that we don't want to keep */
@@ -319,10 +319,10 @@
     trace_apply_filter(this_vlib_main);
 
     traces = 0;
-    pool_foreach (h, tm->trace_buffer_pool,
-    ({
+    pool_foreach (h, tm->trace_buffer_pool)
+     {
       vec_add1 (traces, h[0]);
-    }));
+    }
 
     if (vec_len (traces) == 0)
       {
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 9d26e6e..8120bef 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -3575,7 +3575,7 @@
 		   "Read", "Write", "Error", "File Name", "Description");
 
   /* *INDENT-OFF* */
-  pool_foreach (f, fm->file_pool,(
+  pool_foreach (f, fm->file_pool)
    {
       int rv;
       s = format (s, "/proc/self/fd/%d%c", f->file_descriptor, 0);
@@ -3588,7 +3588,7 @@
 		       f->read_events, f->write_events, f->error_events,
 		       path, f->description);
       vec_reset_length (s);
-    }));
+    }
   /* *INDENT-ON* */
   vec_free (s);
 
@@ -3728,7 +3728,7 @@
 
 #define fl(x, y) ( (x) ? toupper((y)) : tolower((y)) )
   /* *INDENT-OFF* */
-  pool_foreach (cf, cm->cli_file_pool, ({
+  pool_foreach (cf, cm->cli_file_pool)  {
     uf = pool_elt_at_index (fm->file_pool, cf->clib_file_index);
     n = vlib_get_node (vm, cf->process_node_index);
     vlib_cli_output (vm,
@@ -3741,7 +3741,7 @@
 		     fl (cf->line_mode, 'l'),
 		     fl (cf->has_epipe, 'p'),
 		     fl (cf->ansi_capable, 'a'));
-  }));
+  }
   /* *INDENT-ON* */
 #undef fl
 
diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c
index 18a87b3..f229ecf 100644
--- a/src/vlibmemory/memory_api.c
+++ b/src/vlibmemory/memory_api.c
@@ -583,10 +583,10 @@
   vec_reset_length (confused_indices);
 
   /* *INDENT-OFF* */
-  pool_foreach (regpp, am->vl_clients, ({
+  pool_foreach (regpp, am->vl_clients)  {
       vl_mem_send_client_keepalive_w_reg (am, now, regpp, &dead_indices,
                                           &confused_indices);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* This should "never happen," but if it does, fix it... */
@@ -893,15 +893,15 @@
 
       /* For horizontal scaling, add a hash table... */
       /* *INDENT-OFF* */
-      pool_foreach (regpp, am->vl_clients,
-      ({
+      pool_foreach (regpp, am->vl_clients)
+       {
         regp = *regpp;
         if (regp && regp->vlib_rp == vlib_rp)
           {
             vlib_cli_output (vm, "%s segment rings:", regp->name);
             goto found;
           }
-      }));
+      }
       vlib_cli_output (vm, "regp %llx not found?", regp);
       continue;
       /* *INDENT-ON* */
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index d724164..a5fb86b 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -85,13 +85,13 @@
   vlib_cli_output (vm, "Socket clients");
   vlib_cli_output (vm, "%20s %8s", "Name", "Fildesc");
     /* *INDENT-OFF* */
-    pool_foreach (reg, sm->registration_pool,
-    ({
+    pool_foreach (reg, sm->registration_pool)
+     {
         if (reg->registration_type == REGISTRATION_TYPE_SOCKET_SERVER) {
             f = vl_api_registration_file (reg);
             vlib_cli_output (vm, "%20s %8d", reg->name, f->file_descriptor);
         }
-    }));
+    }
 /* *INDENT-ON* */
 }
 
@@ -784,11 +784,11 @@
     {
       u32 index;
         /* *INDENT-OFF* */
-        pool_foreach (rp, sm->registration_pool, ({
+        pool_foreach (rp, sm->registration_pool)  {
           vl_api_registration_del_file (rp);
           index = rp->vl_api_registration_pool_index;
           vl_socket_free_registration_index (index);
-        }));
+        }
 /* *INDENT-ON* */
     }
 
diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c
index 5a06c65..aca9aac 100644
--- a/src/vlibmemory/vlib_api_cli.c
+++ b/src/vlibmemory/vlib_api_cli.c
@@ -111,8 +111,8 @@
 		   "Name", "PID", "Queue Length", "Queue VA", "Health");
 
   /* *INDENT-OFF* */
-  pool_foreach (regpp, am->vl_clients,
-  ({
+  pool_foreach (regpp, am->vl_clients)
+   {
     regp = *regpp;
 
     if (regp)
@@ -134,7 +134,7 @@
                       regpp - am->vl_clients);
         vec_add1 (confused_indices, regpp - am->vl_clients);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   /* This should "never happen," but if it does, fix it... */
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index 5c6ea9b..d389022 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -680,8 +680,8 @@
         else
         {
             /* *INDENT-OFF* */
-            pool_foreach_index(ai, adj_pool,
-            ({
+            pool_foreach_index (ai, adj_pool)
+             {
                 if (~0 != sw_if_index &&
                     sw_if_index != adj_get_sw_if_index(ai))
                 {
@@ -693,7 +693,7 @@
                                      format_ip_adjacency, ai,
                                      FORMAT_IP_ADJACENCY_NONE);
                 }
-            }));
+            }
             /* *INDENT-ON* */
         }
     }
diff --git a/src/vnet/bfd/bfd_api.c b/src/vnet/bfd/bfd_api.c
index cc28b0b..ba7783f 100644
--- a/src/vnet/bfd/bfd_api.c
+++ b/src/vnet/bfd/bfd_api.c
@@ -181,7 +181,7 @@
   vpe_client_registration_t *reg;
   vl_api_registration_t *vl_reg;
   /* *INDENT-OFF* */
-  pool_foreach (reg, vam->bfd_events_registrations, ({
+  pool_foreach (reg, vam->bfd_events_registrations)  {
     vl_reg = vl_api_client_index_to_registration (reg->client_index);
     if (vl_reg)
       {
@@ -193,7 +193,7 @@
 	    send_bfd_udp_session_details (vl_reg, 0, bs);
 	  }
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -208,11 +208,11 @@
 
   bfd_session_t *bs = NULL;
   /* *INDENT-OFF* */
-  pool_foreach (bs, bfd_main.sessions, ({
+  pool_foreach (bs, bfd_main.sessions)  {
     if (bs->transport == BFD_TRANSPORT_UDP4 ||
 	bs->transport == BFD_TRANSPORT_UDP6)
       send_bfd_udp_session_details (reg, mp->context, bs);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -265,7 +265,7 @@
   vl_api_bfd_auth_keys_details_t *rmp = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach (key, bfd_main.auth_keys, ({
+  pool_foreach (key, bfd_main.auth_keys)  {
     rmp = vl_msg_api_alloc (sizeof (*rmp));
     clib_memset (rmp, 0, sizeof (*rmp));
     rmp->_vl_msg_id = ntohs (VL_API_BFD_AUTH_KEYS_DETAILS);
@@ -274,7 +274,7 @@
     rmp->auth_type = key->auth_type;
     rmp->use_count = clib_host_to_net_u32 (key->use_count);
     vl_api_send_msg (reg, (u8 *)rmp);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/bfd/bfd_cli.c b/src/vnet/bfd/bfd_cli.c
index a6953bd..1d100b0 100644
--- a/src/vnet/bfd/bfd_cli.c
+++ b/src/vnet/bfd/bfd_cli.c
@@ -135,10 +135,10 @@
       u8 *s = format (NULL, "%=10s %=25s %=10s\n", "Configuration Key ID",
 		      "Type", "Use Count");
       /* *INDENT-OFF* */
-      pool_foreach (key, bm->auth_keys, {
+      pool_foreach (key, bm->auth_keys) {
         s = format (s, "%10u %-25s %10u\n", key->conf_key_id,
                     bfd_auth_type_str (key->auth_type), key->use_count);
-      });
+      }
       /* *INDENT-ON* */
       vlib_cli_output (vm, "%v\n", s);
       vec_free (s);
@@ -150,9 +150,9 @@
       u8 *s = format (NULL, "%=10s %=32s %=20s %=20s\n", "Index", "Property",
 		      "Local value", "Remote value");
       /* *INDENT-OFF* */
-      pool_foreach (bs, bm->sessions, {
+      pool_foreach (bs, bm->sessions) {
         s = format (s, "%U", format_bfd_session_cli, vm, bs);
-      });
+      }
       /* *INDENT-ON* */
       vlib_cli_output (vm, "%v", s);
       vec_free (s);
diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c
index 2bb4c1d..1facb73 100644
--- a/src/vnet/bfd/bfd_udp.c
+++ b/src/vnet/bfd/bfd_udp.c
@@ -1581,17 +1581,19 @@
   if (!is_create)
     {
       bfd_session_t *bs;
-      pool_foreach (bs, bfd_udp_main.bfd_main->sessions,
-		    {
-		    if (bs->transport != BFD_TRANSPORT_UDP4 &&
-			bs->transport != BFD_TRANSPORT_UDP6)
-		    {
-		    continue;}
-		    if (bs->udp.key.sw_if_index != sw_if_index)
-		    {
-		    continue;}
-		    vec_add1 (to_be_freed, bs);}
-      );
+      pool_foreach (bs, bfd_udp_main.bfd_main->sessions)
+      {
+	if (bs->transport != BFD_TRANSPORT_UDP4 &&
+	    bs->transport != BFD_TRANSPORT_UDP6)
+	  {
+	    continue;
+	  }
+	if (bs->udp.key.sw_if_index != sw_if_index)
+	  {
+	    continue;
+	  }
+	vec_add1 (to_be_freed, bs);
+      }
     }
   bfd_session_t **bs;
   vec_foreach (bs, to_be_freed)
diff --git a/src/vnet/bier/bier_api.c b/src/vnet/bier/bier_api.c
index e06a53e..366fba1 100644
--- a/src/vnet/bier/bier_api.c
+++ b/src/vnet/bier/bier_api.c
@@ -145,8 +145,8 @@
     if (!reg)
       return;
 
-    pool_foreach(bt, bier_table_pool,
-    ({
+    pool_foreach (bt, bier_table_pool)
+     {
         /*
          * skip the ecmp tables.
          */
@@ -154,7 +154,7 @@
         {
             send_bier_table_details(reg, mp->context, bt);
         }
-    }));
+    }
 }
 
 static void
@@ -405,10 +405,10 @@
     if (!reg)
       return;
 
-    pool_foreach(bi, bier_imp_pool,
-    ({
+    pool_foreach (bi, bier_imp_pool)
+     {
         send_bier_imp_details(reg, mp->context, bi);
-    }));
+    }
 }
 
 static void
@@ -466,10 +466,10 @@
     if (!reg)
       return;
 
-    pool_foreach(bdt, bier_disp_table_pool,
-    ({
+    pool_foreach (bdt, bier_disp_table_pool)
+     {
         send_bier_disp_table_details(reg, mp->context, bdt);
-    }));
+    }
 }
 
 static void
diff --git a/src/vnet/bier/bier_disp_table.c b/src/vnet/bier/bier_disp_table.c
index cf9f053..bdbc9a9 100644
--- a/src/vnet/bier/bier_disp_table.c
+++ b/src/vnet/bier/bier_disp_table.c
@@ -376,12 +376,12 @@
 
     if (INDEX_INVALID == bdti)
     {
-        pool_foreach(bdt, bier_disp_table_pool,
-        ({
+        pool_foreach (bdt, bier_disp_table_pool)
+         {
             vlib_cli_output(vm, "%U", format_bier_disp_table,
                             bier_disp_table_get_index(bdt),
                             0, BIER_SHOW_BRIEF);
-        }));
+        }
     }
     else
     {
diff --git a/src/vnet/bier/bier_fmask.c b/src/vnet/bier/bier_fmask.c
index a58a77f..b7fca4d 100644
--- a/src/vnet/bier/bier_fmask.c
+++ b/src/vnet/bier/bier_fmask.c
@@ -556,12 +556,12 @@
 
     if (INDEX_INVALID == bfmi)
     {
-        pool_foreach(bfm, bier_fmask_pool,
-        ({
+        pool_foreach (bfm, bier_fmask_pool)
+         {
             vlib_cli_output (vm, "[@%d] %U",
                              bier_fmask_get_index(bfm),
                              format_bier_fmask, bier_fmask_get_index(bfm), 0);
-        }));
+        }
     }
     else
     {
diff --git a/src/vnet/bier/bier_imp.c b/src/vnet/bier/bier_imp.c
index 2da3f66..660b07e 100644
--- a/src/vnet/bier/bier_imp.c
+++ b/src/vnet/bier/bier_imp.c
@@ -265,13 +265,13 @@
 
     if (INDEX_INVALID == bii)
     {
-        pool_foreach(bi, bier_imp_pool,
-        ({
+        pool_foreach (bi, bier_imp_pool)
+         {
             vlib_cli_output(vm, "%U", format_bier_imp,
                             bier_imp_get_index(bi),
                             1,
                             BIER_SHOW_BRIEF);
-        }));
+        }
     }
     else
     {
diff --git a/src/vnet/bier/bier_table.c b/src/vnet/bier/bier_table.c
index 0e8cc1e..4383053 100644
--- a/src/vnet/bier/bier_table.c
+++ b/src/vnet/bier/bier_table.c
@@ -909,10 +909,10 @@
     {
         int ii;
 
-        pool_foreach_index(ii, bier_table_pool,
-        ({
+        pool_foreach_index (ii, bier_table_pool)
+         {
             vlib_cli_output (vm, "%U", format_bier_table, ii, flags);
-        }));
+        }
     }
 }
 
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index 9f9ac53..4ddee4a 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -184,7 +184,7 @@
   bond_interface_details_t *bondif = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach (bif, bm->interfaces,
+  pool_foreach (bif, bm->interfaces) {
     vec_add2(r_bondifs, bondif, 1);
     clib_memset (bondif, 0, sizeof (*bondif));
     bondif->id = bif->id;
@@ -200,7 +200,7 @@
     bondif->numa_only = bif->numa_only;
     bondif->active_members = vec_len (bif->active_members);
     bondif->members = vec_len (bif->members);
-  );
+  }
   /* *INDENT-ON* */
 
   *out_bondifs = r_bondifs;
@@ -899,14 +899,14 @@
 		   "load balance", "active members", "members");
 
   /* *INDENT-OFF* */
-  pool_foreach (bif, bm->interfaces,
-  ({
+  pool_foreach (bif, bm->interfaces)
+   {
     vlib_cli_output (vm, "%-16U %-12d %-13U %-13U %-14u %u",
 		     format_bond_interface_name, bif->dev_instance,
 		     bif->sw_if_index, format_bond_mode, bif->mode,
 		     format_bond_load_balance, bif->lb,
 		     vec_len (bif->active_members), vec_len (bif->members));
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -918,8 +918,8 @@
   u32 *sw_if_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (bif, bm->interfaces,
-  ({
+  pool_foreach (bif, bm->interfaces)
+   {
     vlib_cli_output (vm, "%U", format_bond_interface_name, bif->dev_instance);
     vlib_cli_output (vm, "  mode: %U",
 		     format_bond_mode, bif->mode);
@@ -955,7 +955,7 @@
     vlib_cli_output (vm, "  interface id: %d", bif->id);
     vlib_cli_output (vm, "  sw_if_index: %d", bif->sw_if_index);
     vlib_cli_output (vm, "  hw_if_index: %d", bif->hw_if_index);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/classify/classify_api.c b/src/vnet/classify/classify_api.c
index b0750e9..f489928 100644
--- a/src/vnet/classify/classify_api.c
+++ b/src/vnet/classify/classify_api.c
@@ -277,10 +277,10 @@
   u32 count;
 
    /* *INDENT-OFF* */
-   pool_foreach (t, cm->tables,
-   ({
+   pool_foreach (t, cm->tables)
+    {
      vec_add1 (table_ids, ntohl(t - cm->tables));
-   }));
+   }
    /* *INDENT-ON* */
   count = vec_len (table_ids);
 
@@ -365,8 +365,8 @@
   vnet_classify_table_t *t;
 
    /* *INDENT-OFF* */
-   pool_foreach (t, cm->tables,
-   ({
+   pool_foreach (t, cm->tables)
+    {
      if (table_id == t - cm->tables)
        {
          rmp = vl_msg_api_alloc_as_if_client
@@ -385,7 +385,7 @@
          rmp->retval = 0;
          break;
        }
-   }));
+   }
    /* *INDENT-ON* */
 
   if (rmp == 0)
@@ -435,8 +435,8 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (t, cm->tables,
-  ({
+  pool_foreach (t, cm->tables)
+   {
     if (table_id == t - cm->tables)
       {
         vnet_classify_bucket_t * b;
@@ -467,7 +467,7 @@
           }
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/classify/vnet_classify.c b/src/vnet/classify/vnet_classify.c
index 1e7515e..088890a 100644
--- a/src/vnet/classify/vnet_classify.c
+++ b/src/vnet/classify/vnet_classify.c
@@ -2190,11 +2190,11 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (t, cm->tables,
-  ({
+  pool_foreach (t, cm->tables)
+   {
     if (match_index == ~0 || (match_index == t - cm->tables))
       vec_add1 (indices, t - cm->tables);
-  }));
+  }
   /* *INDENT-ON* */
 
   if (vec_len (indices))
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index 62371cd..31d4df0 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -506,8 +506,8 @@
   af_packet_if_detail_t *af_packet_if = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach (apif, apm->interfaces,
-    ({
+  pool_foreach (apif, apm->interfaces)
+     {
       vec_add2 (r_af_packet_ifs, af_packet_if, 1);
       af_packet_if->sw_if_index = apif->sw_if_index;
       if (apif->host_if_name)
@@ -516,7 +516,7 @@
 		       MIN (ARRAY_LEN (af_packet_if->host_if_name) - 1,
 		       strlen ((const char *) apif->host_if_name)));
 	}
-    }));
+    }
   /* *INDENT-ON* */
 
   *out_af_packet_ifs = r_af_packet_ifs;
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index 89b2ff0..10f4bb0 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -297,9 +297,8 @@
   if (vec_len (hw_if_indices) == 0)
     {
       /* *INDENT-OFF* */
-      pool_foreach (vif, mm->interfaces,
+      pool_foreach (vif, mm->interfaces)
 	  vec_add1 (hw_if_indices, vif->hw_if_index);
-      );
       /* *INDENT-ON* */
     }
 
@@ -347,9 +346,8 @@
   if (vec_len (hw_if_indices) == 0)
     {
       /* *INDENT-OFF* */
-      pool_foreach (vif, mm->interfaces,
+      pool_foreach (vif, mm->interfaces)
           vec_add1 (hw_if_indices, vif->hw_if_index);
-      );
       /* *INDENT-ON* */
     }
 
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index b65879c..11c2480 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -946,7 +946,7 @@
   tap_interface_details_t *tapid = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach (vif, mm->interfaces,
+  pool_foreach (vif, mm->interfaces) {
     if ((vif->type != VIRTIO_IF_TYPE_TAP)
       && (vif->type != VIRTIO_IF_TYPE_TUN))
       continue;
@@ -988,7 +988,7 @@
       clib_memcpy(tapid->host_ip6_addr.as_u8, &vif->host_ip6_addr, 16);
     tapid->host_ip6_prefix_len = vif->host_ip6_prefix_len;
     tapid->host_mtu_size = vif->host_mtu_size;
-  );
+  }
   /* *INDENT-ON* */
 
   *out_tapids = r_tapids;
diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c
index 05f9eab..a783369 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -231,9 +231,8 @@
 
   if (vec_len (hw_if_indices) == 0)
     {
-      pool_foreach (vif, vim->interfaces,
-		    vec_add1 (hw_if_indices, vif->hw_if_index);
-	);
+      pool_foreach (vif, vim->interfaces)
+	vec_add1 (hw_if_indices, vif->hw_if_index);
     }
   else if (show_device_config)
     {
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 785ca48..93ea70b 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -1352,7 +1352,7 @@
   u32 interrupt_count = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (vif, vim->interfaces, ({
+  pool_foreach (vif, vim->interfaces)  {
     if (vif->pci_addr.as_u32 == args->addr)
       {
 	args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -1363,7 +1363,7 @@
                 " PCI address in use");
 	return;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_get (vim->interfaces, vif);
diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c
index f7cecef..45897b6 100644
--- a/src/vnet/devices/virtio/vhost_user.c
+++ b/src/vnet/devices/virtio/vhost_user.c
@@ -1126,7 +1126,7 @@
 
 	case ~0:
 	  /* *INDENT-OFF* */
-	  pool_foreach (vui, vum->vhost_user_interfaces, {
+	  pool_foreach (vui, vum->vhost_user_interfaces) {
 	      next_timeout = timeout;
 	      for (qid = 0; qid < VHOST_VRING_MAX_N / 2; qid += 2)
 		{
@@ -1154,7 +1154,7 @@
 		  if ((next_timeout < timeout) && (next_timeout > 0.0))
 		    timeout = next_timeout;
 		}
-	  });
+	  }
           /* *INDENT-ON* */
 	  break;
 
@@ -1205,7 +1205,7 @@
       timeout = 3.0;
 
       /* *INDENT-OFF* */
-      pool_foreach (vui, vum->vhost_user_interfaces, {
+      pool_foreach (vui, vum->vhost_user_interfaces) {
 
 	  if (vui->unix_server_index == ~0) { //Nothing to do for server sockets
 	      if (vui->clib_file_index == ~0)
@@ -1273,7 +1273,7 @@
 		    }
 		}
 	  }
-      });
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -1408,9 +1408,9 @@
 
   vlib_worker_thread_barrier_sync (vlib_get_main ());
   /* *INDENT-OFF* */
-  pool_foreach (vui, vum->vhost_user_interfaces, {
+  pool_foreach (vui, vum->vhost_user_interfaces) {
       vhost_user_delete_if (vnm, vm, vui->sw_if_index);
-  });
+  }
   /* *INDENT-ON* */
   vlib_worker_thread_barrier_release (vlib_get_main ());
   return 0;
@@ -1832,9 +1832,8 @@
   if (!out_vuids)
     return -1;
 
-  pool_foreach (vui, vum->vhost_user_interfaces,
-		vec_add1 (hw_if_indices, vui->hw_if_index);
-    );
+  pool_foreach (vui, vum->vhost_user_interfaces)
+    vec_add1 (hw_if_indices, vui->hw_if_index);
 
   for (i = 0; i < vec_len (hw_if_indices); i++)
     {
@@ -2110,9 +2109,8 @@
     }
   if (vec_len (hw_if_indices) == 0)
     {
-      pool_foreach (vui, vum->vhost_user_interfaces,
-		    vec_add1 (hw_if_indices, vui->hw_if_index);
-	);
+      pool_foreach (vui, vum->vhost_user_interfaces)
+	vec_add1 (hw_if_indices, vui->hw_if_index);
     }
   vlib_cli_output (vm, "Virtio vhost-user interfaces");
   vlib_cli_output (vm, "Global:\n  coalesce frames %d time %e",
@@ -2509,9 +2507,8 @@
 
   if (vum->dont_dump_vhost_user_memory)
     {
-      pool_foreach (vui, vum->vhost_user_interfaces,
-		    unmap_all_mem_regions (vui);
-	);
+      pool_foreach (vui, vum->vhost_user_interfaces)
+	unmap_all_mem_regions (vui);
     }
 }
 
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index bd72284..4d0b663 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -232,14 +232,13 @@
   if (!reg)
     return;
 
-  pool_foreach (vif, vmx->interfaces, (
-					{
-					if (vif->type == VIRTIO_IF_TYPE_PCI)
-					{
-					virtio_pci_send_sw_interface_details
-					(am, reg, vif, mp->context);}
-					}
-		));
+  pool_foreach (vif, vmx->interfaces)
+  {
+    if (vif->type == VIRTIO_IF_TYPE_PCI)
+      {
+	virtio_pci_send_sw_interface_details (am, reg, vif, mp->context);
+      }
+  }
 }
 
 #define vl_msg_name_crc_list
diff --git a/src/vnet/devices/virtio/virtio_process.c b/src/vnet/devices/virtio/virtio_process.c
index 7a25611..1689459 100644
--- a/src/vnet/devices/virtio/virtio_process.c
+++ b/src/vnet/devices/virtio/virtio_process.c
@@ -46,7 +46,7 @@
 
 	case ~0:
           /* *INDENT-OFF* */
-          pool_foreach (vif, vim->interfaces, {
+          pool_foreach (vif, vim->interfaces) {
               if (vif->packet_coalesce || vif->packet_buffering)
                 {
                   virtio_vring_t *vring;
@@ -59,7 +59,7 @@
                                              RX_QUEUE_ACCESS (vring->queue_id));
                   }
                 }
-          });
+          }
           /* *INDENT-ON* */
 	  break;
 
diff --git a/src/vnet/dpo/load_balance.c b/src/vnet/dpo/load_balance.c
index c0c440c..fb876a0 100644
--- a/src/vnet/dpo/load_balance.c
+++ b/src/vnet/dpo/load_balance.c
@@ -1029,12 +1029,12 @@
     {
         load_balance_t *lb;
 
-        pool_foreach(lb, load_balance_pool,
-        ({
+        pool_foreach (lb, load_balance_pool)
+         {
             vlib_cli_output (vm, "%U", format_load_balance,
                              load_balance_get_index(lb),
                              LOAD_BALANCE_FORMAT_NONE);
-        }));
+        }
     }
 
     return 0;
diff --git a/src/vnet/dpo/load_balance_map.c b/src/vnet/dpo/load_balance_map.c
index de5f30b..5524974 100644
--- a/src/vnet/dpo/load_balance_map.c
+++ b/src/vnet/dpo/load_balance_map.c
@@ -575,11 +575,11 @@
     {
         load_balance_map_t *lbm;
 
-        pool_foreach(lbm, load_balance_map_pool,
-        ({
+        pool_foreach (lbm, load_balance_map_pool)
+         {
             vlib_cli_output (vm, "%U", format_load_balance_map,
                              load_balance_map_get_index(lbm), 0);
-        }));
+        }
     }
 
     return 0;
diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c
index 677a19f..23a1285 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -1480,13 +1480,13 @@
     {
         lookup_dpo_t *lkd;
 
-        pool_foreach(lkd, lookup_dpo_pool,
-        ({
+        pool_foreach (lkd, lookup_dpo_pool)
+         {
             vlib_cli_output (vm, "[@%d] %U",
                              lookup_dpo_get_index(lkd),
                              format_lookup_dpo,
                              lookup_dpo_get_index(lkd));
-        }));
+        }
     }
 
     return 0;
diff --git a/src/vnet/dpo/replicate_dpo.c b/src/vnet/dpo/replicate_dpo.c
index cd753dc..929fed0 100644
--- a/src/vnet/dpo/replicate_dpo.c
+++ b/src/vnet/dpo/replicate_dpo.c
@@ -697,12 +697,12 @@
     {
         replicate_t *rep;
 
-        pool_foreach(rep, replicate_pool,
-        ({
+        pool_foreach (rep, replicate_pool)
+         {
             vlib_cli_output (vm, "%U", format_replicate,
                              replicate_get_index(rep),
                              REPLICATE_FORMAT_NONE);
-        }));
+        }
     }
 
     return 0;
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index 33c29a6..a5fab85 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -357,14 +357,14 @@
 			  pool_len(fib_entry_pool),
 			  sizeof(fib_entry_t));
 
-    pool_foreach(entry, fib_entry_pool,
-    ({
+    pool_foreach (entry, fib_entry_pool)
+     {
 	n_srcs += vec_len(entry->fe_srcs);
 	vec_foreach(esrc, entry->fe_srcs)
 	{
 	    n_exts += fib_path_ext_list_length(&esrc->fes_path_exts);
 	}
-    }));
+    }
 
     fib_show_memory_usage("Entry Source",
 			  n_srcs, n_srcs, sizeof(fib_entry_src_t));
@@ -1741,11 +1741,11 @@
     fib_node_index_t *fei, *feis = NULL;
     fib_entry_t *fib_entry;
 
-    pool_foreach (fib_entry, fib_entry_pool,
-    ({
+    pool_foreach (fib_entry, fib_entry_pool)
+     {
         if (fib_entry->fe_fib_index == fib_table->ft_index)
             vec_add1 (feis, fib_entry_get_index(fib_entry));
-    }));
+    }
 
     if (vec_len(feis))
     {
@@ -1787,13 +1787,13 @@
 	 * show all
 	 */
 	vlib_cli_output (vm, "FIB Entries:");
-	pool_foreach_index(fei, fib_entry_pool,
-        ({
+	pool_foreach_index (fei, fib_entry_pool)
+         {
 	    vlib_cli_output (vm, "%d@%U",
 			     fei,
 			     format_fib_entry, fei,
 			     FIB_ENTRY_FORMAT_BRIEF);
-	}));
+	}
     }
 
     return (NULL);
diff --git a/src/vnet/fib/fib_entry_delegate.c b/src/vnet/fib/fib_entry_delegate.c
index d7503fb..466327b 100644
--- a/src/vnet/fib/fib_entry_delegate.c
+++ b/src/vnet/fib/fib_entry_delegate.c
@@ -333,12 +333,12 @@
 	 * show all
 	 */
 	vlib_cli_output (vm, "FIB Entry Delegates:");
-	pool_foreach_index(fedi, fib_entry_delegate_pool,
-        ({
+	pool_foreach_index (fedi, fib_entry_delegate_pool)
+         {
 	    vlib_cli_output (vm, "%d@%U",
 			     fedi,
 			     format_fib_entry_delegate, fedi);
-	}));
+	}
     }
 
     return (NULL);
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 08076ec..f48b644 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -2821,11 +2821,11 @@
     else
     {
 	vlib_cli_output (vm, "FIB Paths");
-	pool_foreach_index (pi, fib_path_pool,
-	({
+	pool_foreach_index (pi, fib_path_pool)
+	 {
 	    vlib_cli_output (vm, "%U", format_fib_path, pi, 0,
                              FIB_PATH_FORMAT_FLAGS_NONE);
-	}));
+	}
     }
 
     return (NULL);
diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c
index 2ad7c30..184399a 100644
--- a/src/vnet/fib/fib_path_list.c
+++ b/src/vnet/fib/fib_path_list.c
@@ -1474,10 +1474,10 @@
 	 * show all
 	 */
 	vlib_cli_output (vm, "FIB Path Lists");
-	pool_foreach_index (pli, fib_path_list_pool,
-	({
+	pool_foreach_index (pli, fib_path_list_pool)
+	 {
 	    vlib_cli_output (vm, "%U", format_fib_path_list, pli, 0);
-	}));
+	}
     }
     return (NULL);
 }
diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c
index bd22514..4f751a6 100644
--- a/src/vnet/fib/fib_urpf_list.c
+++ b/src/vnet/fib/fib_urpf_list.c
@@ -207,12 +207,12 @@
 	 * show all
 	 */
 	vlib_cli_output (vm, "FIB uRPF Entries:");
-	pool_foreach_index(ui, fib_urpf_list_pool,
-        ({
+	pool_foreach_index (ui, fib_urpf_list_pool)
+         {
 	    vlib_cli_output (vm, "%d@%U",
 			     ui,
 			     format_fib_urpf_list, ui);
-	}));
+	}
     }
 
     return (NULL);
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index 9142c63..a301014 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -616,8 +616,8 @@
 	    break;
     }
 
-    pool_foreach (fib_table, im4->fibs,
-    ({
+    pool_foreach (fib_table, im4->fibs)
+     {
 	ip4_fib_t *fib = pool_elt_at_index(im4->v4_fibs, fib_table->ft_index);
         fib_source_t source;
         u8 *s = NULL;
@@ -704,7 +704,7 @@
 	    ip4_fib_table_show_one(fib, vm, &matching_address,
                                    matching_mask, detail);
 	}
-    }));
+    }
 
     if (memory)
     {
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index 861edcc..6943166 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -696,8 +696,8 @@
         return (NULL);
     }
 
-    pool_foreach (fib_table, im6->fibs,
-    ({
+    pool_foreach (fib_table, im6->fibs)
+     {
         fib_source_t source;
         u8 *s = NULL;
 
@@ -762,7 +762,7 @@
 	{
 	    ip6_fib_table_show_one(fib, vm, &matching_address, mask_len, detail);
 	}
-    }));
+    }
 
     return 0;
 }
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c
index 9ec32d2..494d010 100644
--- a/src/vnet/fib/mpls_fib.c
+++ b/src/vnet/fib/mpls_fib.c
@@ -441,8 +441,8 @@
 	    break;
     }
 
-    pool_foreach (fib_table, mpls_main.fibs,
-    ({
+    pool_foreach (fib_table, mpls_main.fibs)
+     {
         fib_source_t source;
         u8 *s = NULL;
 
@@ -470,7 +470,7 @@
 	{
 	    mpls_fib_table_show_one(mpls_fib_get(fib_table->ft_index), label, vm);
 	}
-    }));
+    }
 
     return 0;
 }
diff --git a/src/vnet/flow/flow_cli.c b/src/vnet/flow/flow_cli.c
index 7dd6867..aea2534 100644
--- a/src/vnet/flow/flow_cli.c
+++ b/src/vnet/flow/flow_cli.c
@@ -240,10 +240,10 @@
 
 no_args:
   /* *INDENT-OFF* */
-  pool_foreach (f, fm->global_flow_pool,
+  pool_foreach (f, fm->global_flow_pool)
     {
       vlib_cli_output (vm, "%U\n", format_flow, f);
-    });
+    }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/vnet/gre/gre_api.c b/src/vnet/gre/gre_api.c
index f4c8efa..e83635a 100644
--- a/src/vnet/gre/gre_api.c
+++ b/src/vnet/gre/gre_api.c
@@ -168,10 +168,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, gm->tunnels,
-      ({
+      pool_foreach (t, gm->tunnels)
+       {
         send_gre_tunnel_details(t, mp);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c
index 5e8ad46..30c8dc4 100644
--- a/src/vnet/gre/interface.c
+++ b/src/vnet/gre/interface.c
@@ -742,10 +742,10 @@
   if (~0 == ti)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, gm->tunnels,
-      ({
+      pool_foreach (t, gm->tunnels)
+       {
           vlib_cli_output (vm, "%U", format_gre_tunnel, t);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index d091913..82dc29b 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -139,22 +139,22 @@
   /* Serialize hardware interface classes since they may have changed.
      Must do this before sending up/down flags. */
   /* *INDENT-OFF* */
-  pool_foreach (hif, im->hw_interfaces, ({
+  pool_foreach (hif, im->hw_interfaces)  {
     vnet_hw_interface_class_t * hw_class = vnet_get_hw_interface_class (vnm, hif->hw_class_index);
     serialize_cstring (m, hw_class->name);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Send sw/hw interface state when non-zero. */
   /* *INDENT-OFF* */
-  pool_foreach (sif, im->sw_interfaces, ({
+  pool_foreach (sif, im->sw_interfaces)  {
     if (sif->flags != 0)
       {
 	vec_add2 (sts, st, 1);
 	st->sw_hw_if_index = sif->sw_if_index;
 	st->flags = sif->flags;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_serialize (m, sts, serialize_vec_vnet_sw_hw_interface_state);
@@ -163,14 +163,14 @@
     _vec_len (sts) = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (hif, im->hw_interfaces, ({
+  pool_foreach (hif, im->hw_interfaces)  {
     if (hif->flags != 0)
       {
 	vec_add2 (sts, st, 1);
 	st->sw_hw_if_index = hif->hw_if_index;
 	st->flags = vnet_hw_interface_flags_to_sw(hif->flags);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_serialize (m, sts, serialize_vec_vnet_sw_hw_interface_state);
@@ -204,7 +204,7 @@
     clib_error_t *error;
 
     /* *INDENT-OFF* */
-    pool_foreach (hif, im->hw_interfaces, ({
+    pool_foreach (hif, im->hw_interfaces)  {
       unserialize_cstring (m, &class_name);
       p = hash_get_mem (im->hw_interface_class_by_name, class_name);
       if (p)
@@ -218,7 +218,7 @@
       if (error)
 	clib_error_report (error);
       vec_free (class_name);
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -1109,11 +1109,11 @@
   im = &vnm->interface_main;
 
   /* *INDENT-OFF* */
-  pool_foreach (hi, im->hw_interfaces,
-  ({
+  pool_foreach (hi, im->hw_interfaces)
+   {
     if (WALK_STOP == fn(vnm, hi->hw_if_index, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1127,11 +1127,11 @@
   im = &vnm->interface_main;
 
   /* *INDENT-OFF* */
-  pool_foreach (si, im->sw_interfaces,
+  pool_foreach (si, im->sw_interfaces)
   {
     if (WALK_STOP == fn (vnm, si, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 4fe655c..240f13f 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -367,8 +367,8 @@
 
   char *strcasestr (char *, char *);	/* lnx hdr file botch */
   /* *INDENT-OFF* */
-  pool_foreach (swif, im->sw_interfaces,
-  ({
+  pool_foreach (swif, im->sw_interfaces)
+   {
     if (!vnet_swif_is_api_visible (swif))
         continue;
     vec_reset_length(name);
@@ -379,7 +379,7 @@
 	continue;
 
     send_sw_interface_details (am, rp, swif, name, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_free (name);
@@ -789,12 +789,12 @@
 	    continue;
 
           /* *INDENT-OFF* */
-          pool_foreach(reg, vam->interface_events_registrations,
-          ({
+          pool_foreach (reg, vam->interface_events_registrations)
+           {
             vl_reg = vl_api_client_index_to_registration (reg->client_index);
             if (vl_reg)
 	      send_sw_interface_event (vam, reg, vl_reg, i, event_by_sw_if_index[i]);
-          }));
+          }
           /* *INDENT-ON* */
 	}
       vec_reset_length (event_by_sw_if_index);
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index fa8d5d2..73f70cf 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -112,8 +112,8 @@
 
   /* Gather interfaces. */
   if (vec_len (hw_if_indices) == 0)
-    pool_foreach (hi, im->hw_interfaces,
-		  vec_add1 (hw_if_indices, hi - im->hw_interfaces));
+    pool_foreach (hi, im->hw_interfaces)
+      vec_add1 (hw_if_indices, hi - im->hw_interfaces);
 
   if (verbose < 0)
     verbose = 1;		/* default to verbose (except bond) */
@@ -395,12 +395,12 @@
 	vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
       _vec_len (sorted_sis) = 0;
       /* *INDENT-OFF* */
-      pool_foreach (si, im->sw_interfaces,
-      ({
+      pool_foreach (si, im->sw_interfaces)
+       {
         int visible = vnet_swif_is_api_visible (si);
         if (visible)
-          vec_add1 (sorted_sis, si[0]);}
-        ));
+          vec_add1 (sorted_sis, si[0]);
+        }
       /* *INDENT-ON* */
       /* Sort by name. */
       vec_sort_with_function (sorted_sis, sw_interface_name_compare);
@@ -1207,12 +1207,12 @@
 	vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
       _vec_len (sorted_sis) = 0;
       /* *INDENT-OFF* */
-      pool_foreach (si, im->sw_interfaces,
-      ({
+      pool_foreach (si, im->sw_interfaces)
+       {
         int visible = vnet_swif_is_api_visible (si);
         if (visible)
-          vec_add1 (sorted_sis, si[0]);}
-        ));
+          vec_add1 (sorted_sis, si[0]);
+        }
       /* *INDENT-ON* */
       /* Sort by name. */
       vec_sort_with_function (sorted_sis, sw_interface_name_compare);
diff --git a/src/vnet/ip-neighbor/ip_neighbor.c b/src/vnet/ip-neighbor/ip_neighbor.c
index 2dd8e74..78b45a2 100644
--- a/src/vnet/ip-neighbor/ip_neighbor.c
+++ b/src/vnet/ip-neighbor/ip_neighbor.c
@@ -840,14 +840,14 @@
   ip_neighbor_t *ipn;
 
   /* *INDENT-OFF* */
-  pool_foreach (ipn, ip_neighbor_pool,
-  ({
+  pool_foreach (ipn, ip_neighbor_pool)
+   {
     if ((sw_if_index == ~0 ||
         ipn->ipn_key->ipnk_sw_if_index == sw_if_index) &&
         (N_AF == af ||
          ip_neighbor_get_af(ipn) == af))
        vec_add1 (ipnis, ip_neighbor_get_index(ipn));
-  }));
+  }
 
   /* *INDENT-ON* */
 
@@ -1152,15 +1152,15 @@
 		   sw_if_index);
 
   /* *INDENT-OFF* */
-  pool_foreach (ipn, ip_neighbor_pool,
-  ({
+  pool_foreach (ipn, ip_neighbor_pool)
+   {
     if (ipn->ipn_key->ipnk_sw_if_index == sw_if_index)
       adj_nbr_walk_nh (ipn->ipn_key->ipnk_sw_if_index,
                        ip_address_family_to_fib_proto(ip_neighbor_get_af(ipn)),
                        &ip_addr_46(&ipn->ipn_key->ipnk_ip),
                        ip_neighbor_mk_complete_walk,
                        ipn);
-  }));
+  }
   /* *INDENT-ON* */
 
   adj_glean_update_rewrite_itf (sw_if_index);
@@ -1177,12 +1177,12 @@
 		   sw_if_index, format_ip_address_family, af);
 
   /* *INDENT-OFF* */
-  pool_foreach (ipn, ip_neighbor_pool,
-  ({
+  pool_foreach (ipn, ip_neighbor_pool)
+   {
     if (ip_neighbor_get_af(ipn) == af &&
         ipn->ipn_key->ipnk_sw_if_index == sw_if_index)
       vec_add1 (ipnis, ipn - ip_neighbor_pool);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (ipni, ipnis)
@@ -1210,13 +1210,13 @@
 		   sw_if_index, format_ip_address_family, af);
 
   /* *INDENT-OFF* */
-  pool_foreach (ipn, ip_neighbor_pool,
-  ({
+  pool_foreach (ipn, ip_neighbor_pool)
+   {
     if (ip_neighbor_get_af(ipn) == af &&
         ipn->ipn_key->ipnk_sw_if_index == sw_if_index &&
         ip_neighbor_is_dynamic (ipn))
       vec_add1 (ipnis, ipn - ip_neighbor_pool);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (ipni, ipnis) ip_neighbor_destroy (ip_neighbor_get (*ipni));
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 77ea4c5..bb70805 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -677,8 +677,8 @@
       ip_interface_address_t *ia;
       vnet_sw_interface_t *sif;
 
-      pool_foreach(sif, vnm->interface_main.sw_interfaces,
-      ({
+      pool_foreach (sif, vnm->interface_main.sw_interfaces)
+       {
           if (im->fib_index_by_sw_if_index[sw_if_index] ==
               im->fib_index_by_sw_if_index[sif->sw_if_index])
             {
@@ -728,7 +728,7 @@
                      }
                  }));
             }
-      }));
+      }
     }
   /* *INDENT-ON* */
 
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index cd753b0..659955a 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -369,8 +369,8 @@
       ip_interface_address_t *ia;
       vnet_sw_interface_t *sif;
 
-      pool_foreach(sif, vnm->interface_main.sw_interfaces,
-      ({
+      pool_foreach (sif, vnm->interface_main.sw_interfaces)
+       {
           if (im->fib_index_by_sw_if_index[sw_if_index] ==
               im->fib_index_by_sw_if_index[sif->sw_if_index])
             {
@@ -417,7 +417,7 @@
                      }
                  }));
             }
-      }));
+      }
     }
   /* *INDENT-ON* */
 
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 3bdb53c..1d0dea8 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -154,17 +154,17 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (fib_table, ip4_main.fibs,
-  ({
+  pool_foreach (fib_table, ip4_main.fibs)
+   {
     send_ip_table_details(am, reg, mp->context, fib_table);
-  }));
-  pool_foreach (fib_table, ip6_main.fibs,
-  ({
+  }
+  pool_foreach (fib_table, ip6_main.fibs)
+   {
     /* don't send link locals */
     if (fib_table->ft_flags & FIB_TABLE_FLAG_IP6_LL)
       continue;
     send_ip_table_details(am, reg, mp->context, fib_table);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -294,14 +294,14 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (mfib_table, ip4_main.mfibs,
-  ({
+  pool_foreach (mfib_table, ip4_main.mfibs)
+   {
       send_ip_mtable_details (reg, mp->context, mfib_table);
-  }));
-  pool_foreach (mfib_table, ip6_main.mfibs,
-  ({
+  }
+  pool_foreach (mfib_table, ip6_main.mfibs)
+   {
       send_ip_mtable_details (reg, mp->context, mfib_table);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -950,8 +950,8 @@
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (si, im->sw_interfaces,
-      ({
+      pool_foreach (si, im->sw_interfaces)
+       {
         if ((si->flags & VNET_SW_INTERFACE_FLAG_UNNUMBERED))
           {
             send_ip_unnumbered_details(am, reg,
@@ -959,7 +959,7 @@
                                        si->unnumbered_sw_if_index,
                                        mp->context);
           }
-      }));
+      }
       /* *INDENT-ON* */
     }
 
@@ -985,10 +985,10 @@
   sorted_sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
   _vec_len (sorted_sis) = 0;
   /* *INDENT-OFF* */
-  pool_foreach (si, im->sw_interfaces,
-  ({
+  pool_foreach (si, im->sw_interfaces)
+   {
     vec_add1 (sorted_sis, si[0]);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (si, sorted_sis)
@@ -1429,8 +1429,8 @@
 
       /* Shut down interfaces in this FIB / clean out intfc routes */
       /* *INDENT-OFF* */
-      pool_foreach (si, im->sw_interfaces,
-      ({
+      pool_foreach (si, im->sw_interfaces)
+       {
         if (fib_index == fib_table_get_index_for_sw_if_index (fproto,
                                                               si->sw_if_index))
           {
@@ -1438,7 +1438,7 @@
             flags &= ~VNET_SW_INTERFACE_FLAG_ADMIN_UP;
             vnet_sw_interface_set_flags (vnm, si->sw_if_index, flags);
           }
-      }));
+      }
       /* *INDENT-ON* */
 
       fib_table_flush (fib_index, fproto, FIB_SOURCE_API);
diff --git a/src/vnet/ip/ip_container_proxy.c b/src/vnet/ip/ip_container_proxy.c
index e90be8b..2c94b70 100644
--- a/src/vnet/ip/ip_container_proxy.c
+++ b/src/vnet/ip/ip_container_proxy.c
@@ -139,20 +139,20 @@
   };
 
   /* *INDENT-OFF* */
-  pool_foreach (fib_table, ip4_main.fibs,
-  ({
+  pool_foreach (fib_table, ip4_main.fibs)
+   {
     fib_table_walk(fib_table->ft_index,
                    FIB_PROTOCOL_IP4,
                    ip_container_proxy_fib_table_walk,
                    &wctx);
-  }));
-  pool_foreach (fib_table, ip6_main.fibs,
-  ({
+  }
+  pool_foreach (fib_table, ip6_main.fibs)
+   {
     fib_table_walk(fib_table->ft_index,
                    FIB_PROTOCOL_IP6,
                    ip_container_proxy_fib_table_walk,
                    &wctx);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index ce7771f..ecd2fb0 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -1576,13 +1576,13 @@
 
 	  vec_reset_length (pool_indexes_to_free);
           /* *INDENT-OFF* */
-          pool_foreach_index (index, rt->pool, ({
+          pool_foreach_index (index, rt->pool)  {
                                 reass = pool_elt_at_index (rt->pool, index);
                                 if (now > reass->last_heard + rm->timeout)
                                   {
                                     vec_add1 (pool_indexes_to_free, index);
                                   }
-                              }));
+                              }
           /* *INDENT-ON* */
 	  int *i;
           /* *INDENT-OFF* */
@@ -1696,9 +1696,9 @@
       if (details)
 	{
           /* *INDENT-OFF* */
-          pool_foreach (reass, rt->pool, {
+          pool_foreach (reass, rt->pool) {
             vlib_cli_output (vm, "%U", format_ip4_reass, vm, reass);
-          });
+          }
           /* *INDENT-ON* */
 	}
       sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c
index 8f3b0f9..c74f8e5 100644
--- a/src/vnet/ip/reass/ip4_sv_reass.c
+++ b/src/vnet/ip/reass/ip4_sv_reass.c
@@ -1203,13 +1203,13 @@
 
 	  vec_reset_length (pool_indexes_to_free);
           /* *INDENT-OFF* */
-          pool_foreach_index (index, rt->pool, ({
+          pool_foreach_index (index, rt->pool)  {
                                 reass = pool_elt_at_index (rt->pool, index);
                                 if (now > reass->last_heard + rm->timeout)
                                   {
                                     vec_add1 (pool_indexes_to_free, index);
                                   }
-                              }));
+                              }
           /* *INDENT-ON* */
 	  int *i;
           /* *INDENT-OFF* */
@@ -1312,9 +1312,9 @@
       if (details)
 	{
           /* *INDENT-OFF* */
-          pool_foreach (reass, rt->pool, {
+          pool_foreach (reass, rt->pool) {
             vlib_cli_output (vm, "%U", format_ip4_sv_reass, vm, reass);
-          });
+          }
           /* *INDENT-ON* */
 	}
       sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c
index f1a3606..80a31e8 100644
--- a/src/vnet/ip/reass/ip6_full_reass.c
+++ b/src/vnet/ip/reass/ip6_full_reass.c
@@ -1520,13 +1520,13 @@
 
 	  vec_reset_length (pool_indexes_to_free);
           /* *INDENT-OFF* */
-          pool_foreach_index (index, rt->pool, ({
+          pool_foreach_index (index, rt->pool)  {
                                 reass = pool_elt_at_index (rt->pool, index);
                                 if (now > reass->last_heard + rm->timeout)
                                   {
                                     vec_add1 (pool_indexes_to_free, index);
                                   }
-                              }));
+                              }
           /* *INDENT-ON* */
 	  int *i;
           /* *INDENT-OFF* */
@@ -1665,9 +1665,9 @@
       if (details)
 	{
           /* *INDENT-OFF* */
-          pool_foreach (reass, rt->pool, {
+          pool_foreach (reass, rt->pool) {
             vlib_cli_output (vm, "%U", format_ip6_full_reass, vm, reass);
-          });
+          }
           /* *INDENT-ON* */
 	}
       sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c
index 7c13f4b..c5c84e5 100644
--- a/src/vnet/ip/reass/ip6_sv_reass.c
+++ b/src/vnet/ip/reass/ip6_sv_reass.c
@@ -1031,13 +1031,13 @@
 
 	  vec_reset_length (pool_indexes_to_free);
           /* *INDENT-OFF* */
-          pool_foreach_index (index, rt->pool, ({
+          pool_foreach_index (index, rt->pool)  {
                                 reass = pool_elt_at_index (rt->pool, index);
                                 if (now > reass->last_heard + rm->timeout)
                                   {
                                     vec_add1 (pool_indexes_to_free, index);
                                   }
-                              }));
+                              }
           /* *INDENT-ON* */
 	  int *i;
           /* *INDENT-OFF* */
@@ -1138,9 +1138,9 @@
       if (details)
 	{
           /* *INDENT-OFF* */
-          pool_foreach (reass, rt->pool, {
+          pool_foreach (reass, rt->pool) {
             vlib_cli_output (vm, "%U", format_ip6_sv_reass, vm, reass);
-          });
+          }
           /* *INDENT-ON* */
 	}
       sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip6-nd/ip6_mld.c b/src/vnet/ip6-nd/ip6_mld.c
index 2a95c84..ea70bcc 100644
--- a/src/vnet/ip6-nd/ip6_mld.c
+++ b/src/vnet/ip6-nd/ip6_mld.c
@@ -327,8 +327,8 @@
   rh0->icmp.checksum = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, imd->mldp_group_pool,
-  ({
+  pool_foreach (m, imd->mldp_group_pool)
+   {
     rr.type = m->type;
     rr.aux_data_len_u32s = 0;
     rr.num_sources = clib_host_to_net_u16 (m->num_sources);
@@ -344,7 +344,7 @@
       }
 
     payload_length += sizeof( icmp6_multicast_address_record_t);
-  }));
+  }
   /* *INDENT-ON* */
 
   rh0->rsvd = 0;
@@ -389,8 +389,8 @@
 
   /* Interface ip6 radv info list */
   /* *INDENT-OFF* */
-  pool_foreach (imd, ip6_mld_pool,
-  ({
+  pool_foreach (imd, ip6_mld_pool)
+   {
     if (!vnet_sw_interface_is_admin_up (vnm, imd->sw_if_index))
       {
         imd->all_routers_mcast = 0;
@@ -404,7 +404,7 @@
         ip6_neighbor_send_mldpv2_report(imd->sw_if_index);
         imd->all_routers_mcast = 1;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -454,13 +454,13 @@
   s = format (s, "%UJoined group address(es):\n", format_white_space, indent);
 
   /* *INDENT-OFF* */
-  pool_foreach (m, imd->mldp_group_pool,
-  ({
+  pool_foreach (m, imd->mldp_group_pool)
+   {
     s = format (s, "%U%U\n",
                 format_white_space, indent+2,
                 format_ip6_address,
                 &m->mcast_address);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (s);
diff --git a/src/vnet/ip6-nd/ip6_nd_api.c b/src/vnet/ip6-nd/ip6_nd_api.c
index 65b3ee3..9e40246 100644
--- a/src/vnet/ip6-nd/ip6_nd_api.c
+++ b/src/vnet/ip6-nd/ip6_nd_api.c
@@ -96,13 +96,13 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (fib_table, im6->fibs,
-  ({
+  pool_foreach (fib_table, im6->fibs)
+   {
     fib_table_walk(fib_table->ft_index,
                    FIB_PROTOCOL_IP6,
                    api_ip6nd_proxy_fib_table_walk,
                    &ctx);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_sort_with_function (ctx.indices, fib_entry_cmp_for_sort);
@@ -237,8 +237,8 @@
   /* *INDENT-OFF* */
   vpe_client_registration_t *rp;
 
-  pool_foreach(rp, vpe_api_main.ip6_ra_events_registrations,
-  ({
+  pool_foreach (rp, vpe_api_main.ip6_ra_events_registrations)
+   {
     vl_api_registration_t *vl_reg;
 
     vl_reg = vl_api_client_index_to_registration (rp->client_index);
@@ -287,7 +287,7 @@
 
         vl_api_send_msg (vl_reg, (u8 *) event);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c
index 97c5b4a..a3d95ee 100644
--- a/src/vnet/ip6-nd/ip6_ra.c
+++ b/src/vnet/ip6-nd/ip6_ra.c
@@ -525,8 +525,8 @@
 		      ip6_radv_prefix_t *pr_info;
 
 		      /* *INDENT-OFF* */
-		      pool_foreach (pr_info, radv_info->adv_prefixes_pool,
-                      ({
+		      pool_foreach (pr_info, radv_info->adv_prefixes_pool)
+                       {
                         if(pr_info->enabled &&
                            (!pr_info->decrement_lifetime_flag
                             || (pr_info->pref_lifetime_expires >0)))
@@ -589,7 +589,7 @@
                               }
 
                           }
-                      }));
+                      }
 		      /* *INDENT-ON* */
 
 		      /* add additional options before here */
@@ -1007,8 +1007,8 @@
 
 				/* look for matching prefix - if we our advertising it, it better be consistant */
 				/* *INDENT-OFF* */
-				pool_foreach (pr_info, radv_info->adv_prefixes_pool,
-                                ({
+				pool_foreach (pr_info, radv_info->adv_prefixes_pool)
+                                 {
 
                                   ip6_address_t mask;
                                   ip6_address_mask_from_width(&mask, pr_info->prefix_len);
@@ -1036,7 +1036,7 @@
                                         }
                                     }
                                   break;
-                                }));
+                                }
 				/* *INDENT-ON* */
 				break;
 			      }
@@ -1278,12 +1278,12 @@
 	{
 	  due_time = current_time + 1e9;
         /* *INDENT-OFF* */
-        pool_foreach (radv_info, ip6_ra_pool,
-        ({
+        pool_foreach (radv_info, ip6_ra_pool)
+         {
 	    if (check_send_rs (vm, radv_info, current_time, &dt)
 		&& (dt < due_time))
 	      due_time = dt;
-        }));
+        }
         /* *INDENT-ON* */
 	  current_time = vlib_time_now (vm);
 	}
@@ -1440,10 +1440,10 @@
 
   vec_reset_length (radv_indices);
   /* *INDENT-OFF* */
-  pool_foreach (radv_info, ip6_ra_pool,
-  ({
+  pool_foreach (radv_info, ip6_ra_pool)
+   {
     vec_add1 (radv_indices, radv_info - ip6_ra_pool);
-  }));
+  }
   /* *INDENT-ON* */
 
   /*
@@ -1460,8 +1460,8 @@
 	continue;
 
       /* *INDENT-OFF* */
-      pool_foreach (this_prefix, radv_info->adv_prefixes_pool,
-      ({
+      pool_foreach (this_prefix, radv_info->adv_prefixes_pool)
+       {
         if (this_prefix->prefix_len == prefix_len
             && ip6_address_is_equal_masked (&this_prefix->prefix, address,
                                             &mask))
@@ -1481,7 +1481,7 @@
             if (rv != 0)
               clib_warning ("ip6_neighbor_ra_prefix returned %d", rv);
           }
-      }));
+      }
       /* *INDENT-ON*/
     }
 }
@@ -1504,8 +1504,8 @@
 
   /* Interface ip6 radv info list */
   /* *INDENT-OFF* */
-  pool_foreach (radv_info, ip6_ra_pool,
-  ({
+  pool_foreach (radv_info, ip6_ra_pool)
+   {
     if( !vnet_sw_interface_is_admin_up (vnm, radv_info->sw_if_index))
       {
         radv_info->initial_adverts_sent = radv_info->initial_adverts_count-1;
@@ -1592,7 +1592,7 @@
             f = 0;
           }
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (f)
@@ -2118,12 +2118,12 @@
   indent += 2;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, radv_info->adv_prefixes_pool,
-  ({
+  pool_foreach (p, radv_info->adv_prefixes_pool)
+   {
     s = format (s, "%Uprefix %U, length %d\n",
                 format_white_space, indent+2,
                 format_ip6_address, &p->prefix, p->prefix_len);
-  }));
+  }
   /* *INDENT-ON* */
 
   s = format (s, "%UMTU is %d\n",
diff --git a/src/vnet/ip6-nd/rd_cp.c b/src/vnet/ip6-nd/rd_cp.c
index bab1b65..13fd90d 100644
--- a/src/vnet/ip6-nd/rd_cp.c
+++ b/src/vnet/ip6-nd/rd_cp.c
@@ -263,8 +263,8 @@
       router_lifetime_in_sec = r->router_lifetime_in_sec;
       u8 route_already_present = 0;
       /* *INDENT-OFF* */
-      pool_foreach (default_route, rm->default_route_pool,
-      ({
+      pool_foreach (default_route, rm->default_route_pool)
+       {
         if (default_route->sw_if_index != sw_if_index)
           ;
         else if (0 != memcmp (&default_route->router_address,
@@ -275,7 +275,7 @@
             route_already_present = 1;
             goto default_route_pool_foreach_out;
           }
-      }));
+      }
       /* *INDENT-ON* */
     default_route_pool_foreach_out:
 
@@ -334,8 +334,8 @@
 
       u8 address_already_present = 0;
       /* *INDENT-OFF* */
-      pool_foreach (slaac_address, rm->slaac_address_pool,
-      ({
+      pool_foreach (slaac_address, rm->slaac_address_pool)
+       {
         if (slaac_address->sw_if_index != sw_if_index)
           ;
         else if (slaac_address->address_length != prefix_length)
@@ -348,7 +348,7 @@
             address_already_present = 1;
             goto slaac_address_pool_foreach_out;
           }
-      }));
+      }
       /* *INDENT-ON* */
     slaac_address_pool_foreach_out:
 
@@ -415,8 +415,8 @@
 	   * as we are removing elements inside the loop body
 	   */
           /* *INDENT-OFF* */
-          pool_foreach_index (index, rm->slaac_address_pool,
-          ({
+          pool_foreach_index (index, rm->slaac_address_pool)
+           {
             slaac_address = pool_elt_at_index(rm->slaac_address_pool, index);
             if (slaac_address->due_time > current_time)
               {
@@ -430,9 +430,9 @@
                 /* make sure ip6 stays enabled */
                 ip6_link_enable (sw_if_index, NULL);
               }
-          }));
-          pool_foreach_index (index, rm->default_route_pool,
-          ({
+          }
+          pool_foreach_index (index, rm->default_route_pool)
+           {
             default_route = pool_elt_at_index(rm->default_route_pool, index);
             if (default_route->due_time > current_time)
               {
@@ -441,7 +441,7 @@
               }
             else
               remove_default_route (vm, default_route);
-          }));
+          }
           /* *INDENT-ON* */
 	  current_time = vlib_time_now (vm);
 	}
@@ -515,19 +515,19 @@
   if (if_config->enabled && !enable)
     {
       /* *INDENT-OFF* */
-      pool_foreach (slaac_address, rm->slaac_address_pool,
-      ({
+      pool_foreach (slaac_address, rm->slaac_address_pool)
+       {
           remove_slaac_address (vm, slaac_address);
-      }));
+      }
       /* *INDENT-ON* */
     }
   if (if_config->install_default_routes && !install_default_routes)
     {
       /* *INDENT-OFF* */
-      pool_foreach (default_route, rm->default_route_pool,
-      ({
+      pool_foreach (default_route, rm->default_route_pool)
+       {
           remove_default_route (vm, default_route);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/vnet/ipip/ipip_api.c b/src/vnet/ipip/ipip_api.c
index 98e3685..f44c72c 100644
--- a/src/vnet/ipip/ipip_api.c
+++ b/src/vnet/ipip/ipip_api.c
@@ -143,10 +143,10 @@
   if (sw_if_index == ~0)
     {
     /* *INDENT-OFF* */
-    pool_foreach(t, im->tunnels,
-    ({
+    pool_foreach (t, im->tunnels)
+     {
       send_ipip_tunnel_details(t, mp);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
diff --git a/src/vnet/ipip/ipip_cli.c b/src/vnet/ipip/ipip_cli.c
index 872fb33..1a8e889 100644
--- a/src/vnet/ipip/ipip_cli.c
+++ b/src/vnet/ipip/ipip_cli.c
@@ -275,8 +275,8 @@
   if (ti == ~0)
     {
     /* *INDENT-OFF* */
-    pool_foreach(t, gm->tunnels,
-                 ({vlib_cli_output(vm, "%U", format_ipip_tunnel, t); }));
+    pool_foreach (t, gm->tunnels)
+                  {vlib_cli_output(vm, "%U", format_ipip_tunnel, t); }
     /* *INDENT-ON* */
     }
   else
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index a2de1e7..1d92676 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -342,20 +342,20 @@
   ipsec_sa_t *sa;
 
   /* lock all SAs before change im->async_mode */
-  pool_foreach (sa, im->sad, (
-			       {
-			       fib_node_lock (&sa->node);
-			       }));
+  pool_foreach (sa, im->sad)
+  {
+    fib_node_lock (&sa->node);
+  }
 
   im->async_mode = is_enabled;
 
   /* change SA crypto op data before unlock them */
-  pool_foreach (sa, im->sad, (
-			       {
-			       sa->crypto_op_data = is_enabled ?
-			       sa->async_op_data.data : sa->sync_op_data.data;
-			       fib_node_unlock (&sa->node);
-			       }));
+  pool_foreach (sa, im->sad)
+  {
+    sa->crypto_op_data = is_enabled ?
+      sa->async_op_data.data : sa->sync_op_data.data;
+    fib_node_unlock (&sa->node);
+  }
 }
 
 static void
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index 7003791..06e7ba0 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -514,9 +514,9 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (spd, im->spds, ({
+  pool_foreach (spd, im->spds)  {
     send_ipsec_spds_details (spd, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 #else
   clib_warning ("unimplemented");
@@ -1130,7 +1130,7 @@
   ipsec_ah_backend_t *ab;
   ipsec_esp_backend_t *eb;
   /* *INDENT-OFF* */
-  pool_foreach (ab, im->ah_backends, {
+  pool_foreach (ab, im->ah_backends) {
     vl_api_ipsec_backend_details_t *mp = vl_msg_api_alloc (sizeof (*mp));
     clib_memset (mp, 0, sizeof (*mp));
     mp->_vl_msg_id = ntohs (VL_API_IPSEC_BACKEND_DETAILS);
@@ -1141,8 +1141,8 @@
     mp->index = ab - im->ah_backends;
     mp->active = mp->index == im->ah_current_backend ? 1 : 0;
     vl_api_send_msg (rp, (u8 *)mp);
-  });
-  pool_foreach (eb, im->esp_backends, {
+  }
+  pool_foreach (eb, im->esp_backends) {
     vl_api_ipsec_backend_details_t *mp = vl_msg_api_alloc (sizeof (*mp));
     clib_memset (mp, 0, sizeof (*mp));
     mp->_vl_msg_id = ntohs (VL_API_IPSEC_BACKEND_DETAILS);
@@ -1153,7 +1153,7 @@
     mp->index = eb - im->esp_backends;
     mp->active = mp->index == im->esp_current_backend ? 1 : 0;
     vl_api_send_msg (rp, (u8 *)mp);
-  });
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index e0a271d..407ae86 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -424,10 +424,10 @@
   u32 sai;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (sai, im->sad, ({
+  pool_foreach_index (sai, im->sad)  {
     vlib_cli_output(vm, "%U", format_ipsec_sa, sai,
                     (detail ? IPSEC_FORMAT_DETAIL : IPSEC_FORMAT_BRIEF));
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -437,9 +437,9 @@
   u32 spdi;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (spdi, im->spds, ({
+  pool_foreach_index (spdi, im->spds)  {
     vlib_cli_output(vm, "%U", format_ipsec_spd, spdi);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -545,9 +545,9 @@
   if (~0 == sai)
     {
       /* *INDENT-OFF* */
-      pool_foreach_index (sai, im->sad, ({
+      pool_foreach_index (sai, im->sad)  {
         ipsec_sa_clear(sai);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -643,7 +643,7 @@
   u8 *s = format (NULL, "%=25s %=25s %=10s\n", "Name", "Index", "Active");
   ipsec_ah_backend_t *ab;
   /* *INDENT-OFF* */
-  pool_foreach (ab, im->ah_backends, {
+  pool_foreach (ab, im->ah_backends) {
     s = format (s, "%=25s %=25u %=10s\n", ab->name, ab - im->ah_backends,
                 ab - im->ah_backends == im->ah_current_backend ? "yes" : "no");
     if (verbose) {
@@ -657,7 +657,7 @@
         n = vlib_get_node (vm, ab->ah6_decrypt_node_index);
         s = format (s, "     dec6 %s (next %d)\n", n->name, ab->ah6_decrypt_next_index);
     }
-  });
+  }
   /* *INDENT-ON* */
   vlib_cli_output (vm, "%v", s);
   _vec_len (s) = 0;
@@ -665,7 +665,7 @@
   s = format (s, "%=25s %=25s %=10s\n", "Name", "Index", "Active");
   ipsec_esp_backend_t *eb;
   /* *INDENT-OFF* */
-  pool_foreach (eb, im->esp_backends, {
+  pool_foreach (eb, im->esp_backends) {
     s = format (s, "%=25s %=25u %=10s\n", eb->name, eb - im->esp_backends,
                 eb - im->esp_backends == im->esp_current_backend ? "yes"
                                                                  : "no");
@@ -680,7 +680,7 @@
         n = vlib_get_node (vm, eb->esp6_decrypt_node_index);
         s = format (s, "     dec6 %s (next %d)\n", n->name, eb->esp6_decrypt_next_index);
     }
-  });
+  }
   /* *INDENT-ON* */
   vlib_cli_output (vm, "%v", s);
 
diff --git a/src/vnet/ipsec/ipsec_itf.c b/src/vnet/ipsec/ipsec_itf.c
index 97a4387..4a0f9e7 100644
--- a/src/vnet/ipsec/ipsec_itf.c
+++ b/src/vnet/ipsec/ipsec_itf.c
@@ -469,10 +469,10 @@
   index_t ii;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (ii, ipsec_itf_pool,
-  ({
+  pool_foreach_index (ii, ipsec_itf_pool)
+   {
     vlib_cli_output (vm, "%U", format_ipsec_itf, ii);
-  }));
+  }
   /* *INDENT-ON* */
 
   return NULL;
diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c
index 71e86ac..d5a971b 100644
--- a/src/vnet/ipsec/ipsec_sa.c
+++ b/src/vnet/ipsec/ipsec_sa.c
@@ -460,11 +460,11 @@
   ipsec_sa_t *sa;
 
   /* *INDENT-OFF* */
-  pool_foreach (sa, im->sad,
-  ({
+  pool_foreach (sa, im->sad)
+   {
     if (WALK_CONTINUE != cb(sa, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c
index 9116df5..a35b619 100644
--- a/src/vnet/ipsec/ipsec_tun.c
+++ b/src/vnet/ipsec/ipsec_tun.c
@@ -838,10 +838,10 @@
   index_t itpi;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(itpi, ipsec_tun_protect_pool,
-  ({
+  pool_foreach_index (itpi, ipsec_tun_protect_pool)
+   {
     fn (itpi, ctx);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index 746c7fd..2c2f480 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -109,13 +109,13 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (swif, im->sw_interfaces,
-  ({
+  pool_foreach (swif, im->sw_interfaces)
+   {
     config = vec_elt_at_index (l2im->configs, swif->sw_if_index);
     if (l2_input_is_xconnect(config))
       send_l2_xconnect_details (reg, mp->context, swif->sw_if_index,
                                 config->output_sw_if_index);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1112,8 +1112,8 @@
 	    last = now;
 
             /* *INDENT-OFF* */
-            pool_foreach(reg, vpe_api_main.l2_arp_term_events_registrations,
-            ({
+            pool_foreach (reg, vpe_api_main.l2_arp_term_events_registrations)
+             {
               vl_api_registration_t *vl_reg;
               vl_reg = vl_api_client_index_to_registration (reg->client_index);
               ALWAYS_ASSERT (vl_reg != NULL);
@@ -1133,7 +1133,7 @@
                   mac_address_encode(&event->mac, vevent->mac);
                   vl_api_send_msg (vl_reg, (u8 *) vevent);
                 }
-            }));
+            }
             /* *INDENT-ON* */
 	  }
 	  vec_reset_length (l2am->publish_events);
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index 9dc452e..de22cef 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -811,7 +811,7 @@
       sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
       _vec_len (sis) = 0;
       /* *INDENT-OFF* */
-      pool_foreach (si, im->sw_interfaces, ({ vec_add1 (sis, si[0]); }));
+      pool_foreach (si, im->sw_interfaces) { vec_add1 (sis, si[0]); }
       /* *INDENT-ON* */
     }
 
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c
index 3160e65..59b7de9 100644
--- a/src/vnet/l2/l2_rw.c
+++ b/src/vnet/l2/l2_rw.c
@@ -532,9 +532,9 @@
     vlib_cli_output (vm, "No entries\n");
 
   /* *INDENT-OFF* */
-  pool_foreach(e, rw->entries, {
+  pool_foreach (e, rw->entries) {
     vlib_cli_output (vm, "%U\n", format_l2_rw_entry, e);
-  });
+  }
   /* *INDENT-ON* */
   return 0;
 }
diff --git a/src/vnet/l2/l2_xcrw.c b/src/vnet/l2/l2_xcrw.c
index 540ce3f..942cd11 100644
--- a/src/vnet/l2/l2_xcrw.c
+++ b/src/vnet/l2/l2_xcrw.c
@@ -569,10 +569,10 @@
   vlib_cli_output (vm, "%U", format_l2xcrw, 0, 0);
 
   /* *INDENT-OFF* */
-  pool_foreach (t, xcm->tunnels,
-  ({
+  pool_foreach (t, xcm->tunnels)
+   {
     vlib_cli_output (vm, "%U", format_l2xcrw, vnm, t);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/vnet/mfib/ip4_mfib.c b/src/vnet/mfib/ip4_mfib.c
index 6973380..9c64c4a 100644
--- a/src/vnet/mfib/ip4_mfib.c
+++ b/src/vnet/mfib/ip4_mfib.c
@@ -396,8 +396,8 @@
 
     total_memory = 0;
 
-    pool_foreach (mfib_table, ip4_main.mfibs,
-    ({
+    pool_foreach (mfib_table, ip4_main.mfibs)
+     {
         ip4_mfib_t *mfib = &mfib_table->v4;
         uword mfib_size;
         int i;
@@ -415,7 +415,7 @@
         }
 
         total_memory += mfib_size;
-    }));
+    }
 
     s = format(s, "%=30s %=6d %=12ld\n",
                "IPv4 multicast",
@@ -525,8 +525,8 @@
             break;
     }
 
-    pool_foreach (mfib_table, im4->mfibs,
-    ({
+    pool_foreach (mfib_table, im4->mfibs)
+     {
         ip4_mfib_t *mfib = &mfib_table->v4;
 
         if (table_id >= 0 && table_id != (int)mfib->table_id)
@@ -584,7 +584,7 @@
         {
             ip4_mfib_table_show_one(mfib, vm, &src, &grp, mask);
         }
-    }));
+    }
     if (memory)
         vlib_cli_output (vm, "totals: hash:%ld", total_hash_memory);
 
diff --git a/src/vnet/mfib/ip6_mfib.c b/src/vnet/mfib/ip6_mfib.c
index 14c724b..b5e5bce 100644
--- a/src/vnet/mfib/ip6_mfib.c
+++ b/src/vnet/mfib/ip6_mfib.c
@@ -691,8 +691,8 @@
             break;
     }
 
-    pool_foreach (mfib_table, im6->mfibs,
-    ({
+    pool_foreach (mfib_table, im6->mfibs)
+     {
         ip6_mfib_t *mfib = &mfib_table->v6;
 
         if (table_id >= 0 && table_id != (int)mfib->table_id)
@@ -726,7 +726,7 @@
         {
             ip6_mfib_table_show_one(mfib, vm, &src, &grp, mask, cover);
         }
-    }));
+    }
 
     return 0;
 }
diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c
index 471a689..2d47c3c 100644
--- a/src/vnet/mfib/mfib_entry.c
+++ b/src/vnet/mfib/mfib_entry.c
@@ -1646,13 +1646,13 @@
          * show all
          */
         vlib_cli_output (vm, "FIB Entries:");
-        pool_foreach_index(fei, mfib_entry_pool,
-        ({
+        pool_foreach_index (fei, mfib_entry_pool)
+         {
             vlib_cli_output (vm, "%d@%U",
                              fei,
                              format_mfib_entry, fei,
                              MFIB_ENTRY_FORMAT_BRIEF);
-        }));
+        }
     }
 
     return (NULL);
diff --git a/src/vnet/mfib/mfib_itf.c b/src/vnet/mfib/mfib_itf.c
index 3e734c8..99408f7 100644
--- a/src/vnet/mfib/mfib_itf.c
+++ b/src/vnet/mfib/mfib_itf.c
@@ -249,12 +249,12 @@
          * show all
          */
         vlib_cli_output (vm, "mFIB interfaces::");
-        pool_foreach_index(mfii, mfib_itf_pool,
-        ({
+        pool_foreach_index (mfii, mfib_itf_pool)
+         {
             vlib_cli_output (vm, "%d@%U",
                              mfii,
                              format_mfib_itf, mfii);
-        }));
+        }
     }
 
     return (NULL);
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 70e8872..25bd353 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -433,10 +433,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (fib_table, mm->fibs,
-  ({
+  pool_foreach (fib_table, mm->fibs)
+   {
     send_mpls_table_details(am, reg, mp->context, fib_table);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/mpls/mpls_tunnel.c b/src/vnet/mpls/mpls_tunnel.c
index e0fb9ef..54458ea 100644
--- a/src/vnet/mpls/mpls_tunnel.c
+++ b/src/vnet/mpls/mpls_tunnel.c
@@ -617,10 +617,10 @@
 {
     u32 mti;
 
-    pool_foreach_index(mti, mpls_tunnel_pool,
-    ({
+    pool_foreach_index (mti, mpls_tunnel_pool)
+     {
         cb(mti, ctx);
-    }));
+    }
 }
 
 void
@@ -989,12 +989,12 @@
 
     if (~0 == mti)
     {
-        pool_foreach (mt, mpls_tunnel_pool,
-        ({
+        pool_foreach (mt, mpls_tunnel_pool)
+         {
             vlib_cli_output (vm, "[@%d] %U",
                              mt - mpls_tunnel_pool,
                              format_mpls_tunnel, mt);
-        }));
+        }
     }
     else
     {
diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c
index cb8b5bb..6251986 100644
--- a/src/vnet/pg/cli.c
+++ b/src/vnet/pg/cli.c
@@ -64,9 +64,9 @@
     {
       /* No stream specified: enable/disable all streams. */
       /* *INDENT-OFF* */
-        pool_foreach (s, pg->streams, ({
+        pool_foreach (s, pg->streams)  {
             pg_stream_enable_disable (pg, s, is_enable);
-        }));
+        }
 	/* *INDENT-ON* */
     }
   else
@@ -245,9 +245,9 @@
 
   vlib_cli_output (vm, "%U", format_pg_stream, 0, 0);
   /* *INDENT-OFF* */
-  pool_foreach (s, pg->streams, ({
+  pool_foreach (s, pg->streams)  {
       vlib_cli_output (vm, "%U", format_pg_stream, s, verbose);
-    }));
+    }
   /* *INDENT-ON* */
 
 done:
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 975239e..20b0a9e 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -622,11 +622,11 @@
 	   app->app_index, api_client_index);
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk_map, app->worker_maps, ({
+  pool_foreach (wrk_map, app->worker_maps)  {
     app_wrk = app_worker_get (wrk_map->wrk_index);
     if (app_wrk->api_client_index == api_client_index)
       vec_add1 (wrks, app_wrk->wrk_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   if (!vec_len (wrks))
@@ -1357,7 +1357,7 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk_map, app->worker_maps, ({
+  pool_foreach (wrk_map, app->worker_maps)  {
     app_wrk = app_worker_get (wrk_map->wrk_index);
     if (hash_elts (app_wrk->listeners_table) == 0)
       continue;
@@ -1365,7 +1365,7 @@
       vlib_cli_output (vm, "%U", format_app_worker_listener, app_wrk,
                        handle, sm_index, verbose);
     }));
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1382,10 +1382,10 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk_map, app->worker_maps, ({
+  pool_foreach (wrk_map, app->worker_maps)  {
     app_wrk = app_worker_get (wrk_map->wrk_index);
     app_worker_format_connects (app_wrk, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1488,10 +1488,10 @@
 	      format_memory_size, props->tx_fifo_size);
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk_map, app->worker_maps, ({
+  pool_foreach (wrk_map, app->worker_maps)  {
       app_wrk = app_worker_get (wrk_map->wrk_index);
       s = format (s, "%U", format_app_worker, app_wrk);
-  }));
+  }
   /* *INDENT-ON* */
 
   return s;
@@ -1511,9 +1511,9 @@
   application_format_listeners (0, verbose);
 
   /* *INDENT-OFF* */
-  pool_foreach (app, app_main.app_pool, ({
+  pool_foreach (app, app_main.app_pool)  {
     application_format_listeners (app, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1531,9 +1531,9 @@
   application_format_connects (0, verbose);
 
   /* *INDENT-OFF* */
-  pool_foreach (app, app_main.app_pool, ({
+  pool_foreach (app, app_main.app_pool)  {
     application_format_connects (app, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1545,9 +1545,9 @@
   session_cli_return_if_not_enabled ();
 
   /* *INDENT-OFF* */
-  pool_foreach (ckpair, app_main.cert_key_pair_store, ({
+  pool_foreach (ckpair, app_main.cert_key_pair_store)  {
     vlib_cli_output (vm, "%U", format_cert_key_pair, ckpair);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -1558,12 +1558,12 @@
   app_worker_map_t *map;
   app_worker_t *wrk;
   /* *INDENT-OFF* */
-  pool_foreach (map, app->worker_maps, ({
+  pool_foreach (map, app->worker_maps)  {
     wrk = app_worker_get (map->wrk_index);
     vlib_cli_output (vm, "[A%d][%d]%U", app->app_index,
 		     map->wrk_index, format_svm_msg_q,
 		     wrk->event_queue);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1582,9 +1582,9 @@
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (app, app_main.app_pool, ({
+  pool_foreach (app, app_main.app_pool)  {
       appliction_format_app_mq (vm, app);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -1660,9 +1660,9 @@
     {
       vlib_cli_output (vm, "%U", format_application, 0, 0);
       /* *INDENT-OFF* */
-      pool_foreach (app, app_main.app_pool, ({
+      pool_foreach (app, app_main.app_pool)  {
 	vlib_cli_output (vm, "%U", format_application, app, 0);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c
index 1c43c79..b9674be 100644
--- a/src/vnet/session/application_namespace.c
+++ b/src/vnet/session/application_namespace.c
@@ -297,7 +297,7 @@
 
 
   /* *INDENT-OFF* */
-  pool_foreach (cs, app_ns->app_sockets, ({
+  pool_foreach (cs, app_ns->app_sockets)  {
     handle = (app_ns_api_handle_t *) &cs->private_data;
     cf = clib_file_get (&file_main, handle->aah_file_index);
     if (handle->aah_app_wrk_index == APP_INVALID_INDEX)
@@ -308,7 +308,7 @@
     app_wrk = app_worker_get (handle->aah_app_wrk_index);
     vlib_cli_output (vm, "%12d%12d%5u", app_wrk->app_index,
                      app_wrk->wrk_map_index, cf->file_descriptor);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -378,9 +378,9 @@
 		   "sw_if_index", "Name");
 
   /* *INDENT-OFF* */
-  pool_foreach (app_ns, app_namespace_pool, ({
+  pool_foreach (app_ns, app_namespace_pool)  {
     vlib_cli_output (vm, "%U", format_app_namespace, app_ns);
-  }));
+  }
   /* *INDENT-ON* */
 
 done:
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 1d648f9..65f3f08 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -39,7 +39,7 @@
 #define segment_manager_foreach_segment_w_lock(VAR, SM, BODY)		\
 do {									\
     clib_rwlock_reader_lock (&(SM)->segments_rwlock);			\
-    pool_foreach((VAR), ((SM)->segments), (BODY));			\
+    pool_foreach((VAR), ((SM)->segments)) (BODY);			\
     clib_rwlock_reader_unlock (&(SM)->segments_rwlock);			\
 } while (0)
 
@@ -482,9 +482,9 @@
   clib_rwlock_writer_lock (&sm->segments_rwlock);
 
   /* *INDENT-OFF* */
-  pool_foreach (fifo_segment, sm->segments, ({
+  pool_foreach (fifo_segment, sm->segments)  {
     segment_manager_del_segment (sm, fifo_segment);
-  }));
+  }
   /* *INDENT-ON* */
 
   clib_rwlock_writer_unlock (&sm->segments_rwlock);
@@ -667,14 +667,14 @@
   segment_manager_segment_reader_lock (sm);
 
   /* *INDENT-OFF* */
-  pool_foreach (cur, sm->segments, ({
+  pool_foreach (cur, sm->segments)  {
     free_bytes = fifo_segment_available_bytes (cur);
     if (free_bytes > max_free_bytes)
       {
         max_free_bytes = free_bytes;
         fs = cur;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (fs)
@@ -955,7 +955,7 @@
 		       "HighWater", "LowWater", "FifoTuning");
 
       /* *INDENT-OFF* */
-      pool_foreach (sm, smm->segment_managers, ({
+      pool_foreach (sm, smm->segment_managers)  {
         app_wrk = app_worker_get_if_valid (sm->app_wrk_index);
         app = app_wrk ? application_get (app_wrk->app_index) : 0;
         custom_logic = (app && (app->cb_fns.fifo_tuning_callback)) ? 1 : 0;
@@ -967,7 +967,7 @@
                          format_memory_size, max_fifo_size,
                          sm->high_watermark, sm->low_watermark,
                          custom_logic ? "custom" : "none");
-      }));
+      }
       /* *INDENT-ON* */
 
       vlib_cli_output (vm, "\n");
@@ -977,11 +977,11 @@
       vlib_cli_output (vm, "%U", format_fifo_segment, 0, verbose);
 
       /* *INDENT-OFF* */
-      pool_foreach (sm, smm->segment_managers, ({
+      pool_foreach (sm, smm->segment_managers)  {
 	  segment_manager_foreach_segment_w_lock (seg, sm, ({
 	    vlib_cli_output (vm, "%U", format_fifo_segment, seg, verbose);
 	  }));
-      }));
+      }
       /* *INDENT-ON* */
 
     }
@@ -1024,7 +1024,7 @@
   clib_rwlock_reader_lock (&sm->segments_rwlock);
 
   /* *INDENT-OFF* */
-  pool_foreach (fs, sm->segments, ({
+  pool_foreach (fs, sm->segments)  {
     for (slice_index = 0; slice_index < fs->n_slices; slice_index++)
       {
         f = fifo_segment_get_slice_fifo_list (fs, slice_index);
@@ -1053,7 +1053,7 @@
           }
         vec_free (s);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   clib_rwlock_reader_unlock (&sm->segments_rwlock);
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 90c0772..d080ae4 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -969,12 +969,12 @@
       u8 *tag = 0;
       /* *INDENT-OFF* */
       srt16 = &srt->session_rules_tables_16;
-      pool_foreach (rule16, srt16->rules, ({
+      pool_foreach (rule16, srt16->rules)  {
 	ri = mma_rules_table_rule_index_16 (srt16, rule16);
 	tag = session_rules_table_rule_tag (srt, ri, 1);
         send_session_rule_details4 (rule16, is_local, tp, appns_index, tag,
                                     reg, context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   if (is_local || fib_proto == FIB_PROTOCOL_IP6)
@@ -982,12 +982,12 @@
       u8 *tag = 0;
       /* *INDENT-OFF* */
       srt40 = &srt->session_rules_tables_40;
-      pool_foreach (rule40, srt40->rules, ({
+      pool_foreach (rule40, srt40->rules)  {
 	ri = mma_rules_table_rule_index_40 (srt40, rule40);
 	tag = session_rules_table_rule_tag (srt, ri, 1);
         send_session_rule_details6 (rule40, is_local, tp, appns_index, tag,
                                     reg, context);
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index ade76ef..a919754 100644
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -337,14 +337,14 @@
       n_closed = 0;
 
       /* *INDENT-OFF* */
-      pool_foreach(s, pool, ({
+      pool_foreach (s, pool)  {
         if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED)
           {
             n_closed += 1;
             continue;
           }
         vlib_cli_output (vm, "%U", format_session, s, verbose);
-      }));
+      }
       /* *INDENT-ON* */
 
       if (!n_closed)
@@ -622,7 +622,7 @@
 		       "App");
 
       /* *INDENT-OFF* */
-      pool_foreach (s, smm->wrk[0].sessions, ({
+      pool_foreach (s, smm->wrk[0].sessions)  {
 	if (s->session_state != SESSION_STATE_LISTENING
 	    || s->session_type != sst)
 	  continue;
@@ -630,7 +630,7 @@
 	app_name = application_name_from_index (app_wrk->app_index);
 	vlib_cli_output (vm, "%U%-25v%", format_session, s, 0,
 			 app_name);
-      }));
+      }
       /* *INDENT-ON* */
       goto done;
     }
@@ -727,9 +727,9 @@
       /* *INDENT-OFF* */
       vec_foreach (wrk, smm->wrk)
 	{
-	  pool_foreach(session, wrk->sessions, ({
+	  pool_foreach (session, wrk->sessions)  {
 	    clear_session (session);
-	  }));
+	  }
 	};
       /* *INDENT-ON* */
     }
diff --git a/src/vnet/session/session_rules_table.c b/src/vnet/session/session_rules_table.c
index 7f5c7bb..34bd6a3 100644
--- a/src/vnet/session/session_rules_table.c
+++ b/src/vnet/session/session_rules_table.c
@@ -599,9 +599,9 @@
       vlib_cli_output (vm, "IP4 rules");
 
       /* *INDENT-OFF* */
-      pool_foreach(sr4, srt4->rules, ({
+      pool_foreach (sr4, srt4->rules)  {
 	vlib_cli_output (vm, "%U", format_session_rule4, srt, sr4);
-      }));
+      }
       /* *INDENT-ON* */
 
     }
@@ -613,9 +613,9 @@
       vlib_cli_output (vm, "IP6 rules");
 
       /* *INDENT-OFF* */
-      pool_foreach(sr6, srt6->rules, ({
+      pool_foreach (sr6, srt6->rules)  {
         vlib_cli_output (vm, "%U", format_session_rule6, srt, sr6);
-      }));
+      }
       /* *INDENT-ON* */
 
     }
diff --git a/src/vnet/session/session_table.h b/src/vnet/session/session_table.h
index cf4e969..ead3c30 100644
--- a/src/vnet/session/session_table.h
+++ b/src/vnet/session/session_table.h
@@ -72,7 +72,7 @@
 session_table_t *_get_session_tables ();
 
 #define session_table_foreach(VAR, BODY)		\
-  pool_foreach(VAR, _get_session_tables (), BODY)
+  pool_foreach (VAR, _get_session_tables ()) BODY
 
 #endif /* SRC_VNET_SESSION_SESSION_TABLE_H_ */
 /* *INDENT-ON* */
diff --git a/src/vnet/srmpls/sr_mpls_policy.c b/src/vnet/srmpls/sr_mpls_policy.c
index ceff11c..8f08048 100644
--- a/src/vnet/srmpls/sr_mpls_policy.c
+++ b/src/vnet/srmpls/sr_mpls_policy.c
@@ -598,9 +598,9 @@
   vlib_cli_output (vm, "SR MPLS policies:");
 
 	/* *INDENT-OFF* */
-	pool_foreach(sr_policy, sm->sr_policies, {
+	pool_foreach (sr_policy, sm->sr_policies) {
 		vec_add1(vec_policies, sr_policy);
-	});
+	}
 	/* *INDENT-ON* */
 
   vec_foreach_index (i, vec_policies)
diff --git a/src/vnet/srmpls/sr_mpls_steering.c b/src/vnet/srmpls/sr_mpls_steering.c
index 6696449..b12e78d 100644
--- a/src/vnet/srmpls/sr_mpls_steering.c
+++ b/src/vnet/srmpls/sr_mpls_steering.c
@@ -800,9 +800,9 @@
 
   vlib_cli_output (vm, "SR MPLS steering policies:");
   /* *INDENT-OFF* */
-  pool_foreach(steer_pl, sm->steer_policies, ({
+  pool_foreach (steer_pl, sm->steer_policies)  {
     vec_add1(steer_policies, steer_pl);
-  }));
+  }
   /* *INDENT-ON* */
   for (i = 0; i < vec_len (steer_policies); i++)
     {
diff --git a/src/vnet/srp/interface.c b/src/vnet/srp/interface.c
index 3c98f41..329cf2b 100644
--- a/src/vnet/srp/interface.c
+++ b/src/vnet/srp/interface.c
@@ -92,10 +92,10 @@
   srp_interface_t * si;
 
   serialize_integer (m, pool_elts (sm->interface_pool), sizeof (u32));
-  pool_foreach (si, sm->interface_pool, ({
+  pool_foreach (si, sm->interface_pool)  {
     serialize_integer (m, si->rings[SRP_RING_OUTER].hw_if_index, sizeof (u32));
     serialize_integer (m, si->rings[SRP_RING_INNER].hw_if_index, sizeof (u32));
-  }));
+  }
 }
 
 void unserialize_srp_main (serialize_main_t * m, va_list * va)
diff --git a/src/vnet/srp/node.c b/src/vnet/srp/node.c
index 6b76025..926cb7c 100644
--- a/src/vnet/srp/node.c
+++ b/src/vnet/srp/node.c
@@ -845,9 +845,9 @@
 
   while (1)
     {
-      pool_foreach (si, sm->interface_pool, ({
+      pool_foreach (si, sm->interface_pool)  {
 	maybe_send_ips_message (si);
-      }));
+      }
       vlib_process_suspend (vm, 1.0);
     }
 
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c
index 278111f..cb468b9 100644
--- a/src/vnet/srv6/sr_api.c
+++ b/src/vnet/srv6/sr_api.c
@@ -273,10 +273,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (t, sm->localsids,
-  ({
+  pool_foreach (t, sm->localsids)
+   {
     send_sr_localsid_details(t, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -338,10 +338,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (t, sm->sr_policies,
-  ({
+  pool_foreach (t, sm->sr_policies)
+   {
     send_sr_policies_details(t, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -406,10 +406,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (t, sm->sr_policies,
-  ({
+  pool_foreach (t, sm->sr_policies)
+   {
     send_sr_policies_details_with_sl_index(t, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -453,10 +453,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (t, sm->steer_policies,
-  ({
+  pool_foreach (t, sm->steer_policies)
+   {
     send_sr_steering_pol_details(t, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c
index f632415..9361907 100644
--- a/src/vnet/srv6/sr_localsid.c
+++ b/src/vnet/srv6/sr_localsid.c
@@ -397,10 +397,10 @@
 
 	      /* Create a vector out of the plugin pool as recommended */
               /* *INDENT-OFF* */
-              pool_foreach (plugin, sm->plugin_functions,
+              pool_foreach (plugin, sm->plugin_functions)
                 {
                   vec_add1 (vec_plugins, plugin);
-                });
+                }
               /* *INDENT-ON* */
 
 	      vec_foreach (plugin_it, vec_plugins)
@@ -552,7 +552,7 @@
   vlib_cli_output (vm, "SRv6 - My LocalSID Table:");
   vlib_cli_output (vm, "=========================");
   /* *INDENT-OFF* */
-  pool_foreach (ls, sm->localsids, ({ vec_add1 (localsid_list, ls); }));
+  pool_foreach (ls, sm->localsids)  { vec_add1 (localsid_list, ls); }
   /* *INDENT-ON* */
   for (i = 0; i < vec_len (localsid_list); i++)
     {
@@ -2407,8 +2407,8 @@
 		   "SR LocalSIDs behaviors:\n-----------------------\n\n");
 
   /* *INDENT-OFF* */
-  pool_foreach (plugin, sm->plugin_functions,
-    ({ vec_add1 (plugins_vec, plugin); }));
+  pool_foreach (plugin, sm->plugin_functions)
+    { vec_add1 (plugins_vec, plugin); }
   /* *INDENT-ON* */
 
   /* Print static behaviors */
diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c
index a0b151d..3e8a4e4 100644
--- a/src/vnet/srv6/sr_policy_rewrite.c
+++ b/src/vnet/srv6/sr_policy_rewrite.c
@@ -979,10 +979,10 @@
 	  sr_policy_fn_registration_t **plugin_it = 0;
 
 	  /* *INDENT-OFF* */
-	  pool_foreach (plugin, sm->policy_plugin_functions,
+	  pool_foreach (plugin, sm->policy_plugin_functions)
 	    {
 	      vec_add1 (vec_plugins, plugin);
-	    });
+	    }
 	  /* *INDENT-ON* */
 
 	  vec_foreach (plugin_it, vec_plugins)
@@ -1121,8 +1121,8 @@
   vlib_cli_output (vm, "SR policies:");
 
   /* *INDENT-OFF* */
-  pool_foreach  (sr_policy, sm->sr_policies,
-                {vec_add1 (vec_policies, sr_policy); } );
+  pool_foreach (sr_policy, sm->sr_policies)
+                {vec_add1 (vec_policies, sr_policy); }
   /* *INDENT-ON* */
 
   vec_foreach_index (i, vec_policies)
@@ -3411,8 +3411,8 @@
   vlib_cli_output (vm, "SR Policy behaviors:\n-----------------------\n\n");
 
   /* *INDENT-OFF* */
-  pool_foreach (plugin, sm->policy_plugin_functions,
-    ({ vec_add1 (plugins_vec, plugin); }));
+  pool_foreach (plugin, sm->policy_plugin_functions)
+     { vec_add1 (plugins_vec, plugin); }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "Plugin behaviors:\n");
diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c
index aa98a45..9db1390 100644
--- a/src/vnet/srv6/sr_steering.c
+++ b/src/vnet/srv6/sr_steering.c
@@ -492,7 +492,7 @@
 
   vlib_cli_output (vm, "SR steering policies:");
   /* *INDENT-OFF* */
-  pool_foreach (steer_pl, sm->steer_policies, ({vec_add1(steer_policies, steer_pl);}));
+  pool_foreach (steer_pl, sm->steer_policies) {vec_add1(steer_policies, steer_pl);}
   /* *INDENT-ON* */
   vlib_cli_output (vm, "Traffic\t\tSR policy BSID");
   for (i = 0; i < vec_len (steer_policies); i++)
diff --git a/src/vnet/tcp/tcp_bt.c b/src/vnet/tcp/tcp_bt.c
index 07f8678..67e9a14 100644
--- a/src/vnet/tcp/tcp_bt.c
+++ b/src/vnet/tcp/tcp_bt.c
@@ -639,9 +639,9 @@
   vec_reset_length (samples);
 
   /* *INDENT-OFF* */
-  pool_foreach (bts, bt->samples, ({
+  pool_foreach (bts, bt->samples)  {
     vec_add1 (samples, bts - bt->samples);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (si, samples)
diff --git a/src/vnet/teib/teib.c b/src/vnet/teib/teib.c
index 69ed416..dc0c99b 100644
--- a/src/vnet/teib/teib.c
+++ b/src/vnet/teib/teib.c
@@ -317,10 +317,10 @@
   index_t tei;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(tei, teib_pool,
-  ({
+  pool_foreach_index (tei, teib_pool)
+   {
     fn(tei, ctx);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -330,11 +330,11 @@
   index_t tei;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(tei, teib_pool,
-  ({
+  pool_foreach_index (tei, teib_pool)
+   {
     if (sw_if_index == teib_entry_get_sw_if_index(teib_entry_get(tei)))
       fn(tei, ctx);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -345,12 +345,12 @@
   index_t tei;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(tei, teib_pool,
-  ({
+  pool_foreach_index (tei, teib_pool)
+   {
     if (sw_if_index == teib_entry_get_sw_if_index(teib_entry_get(tei)) &&
         af == teib_entry_get_af(teib_entry_get(tei)))
       fn(tei, ctx);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/udp/udp_api.c b/src/vnet/udp/udp_api.c
index 566acbc..5b9d894 100644
--- a/src/vnet/udp/udp_api.c
+++ b/src/vnet/udp/udp_api.c
@@ -103,10 +103,10 @@
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach(ue, udp_encap_pool,
-  ({
+  pool_foreach (ue, udp_encap_pool)
+   {
     send_udp_encap_details(ue, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
diff --git a/src/vnet/udp/udp_encap.c b/src/vnet/udp/udp_encap.c
index 0b1d3d7..28ea560 100644
--- a/src/vnet/udp/udp_encap.c
+++ b/src/vnet/udp/udp_encap.c
@@ -508,11 +508,11 @@
   index_t uei;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(uei, udp_encap_pool,
-  ({
+  pool_foreach_index (uei, udp_encap_pool)
+   {
     if (WALK_STOP == cb(uei, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -537,10 +537,10 @@
   if (INDEX_INVALID == uei)
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(uei, udp_encap_pool,
-      ({
+      pool_foreach_index (uei, udp_encap_pool)
+       {
         vlib_cli_output(vm, "%U", format_udp_encap, uei, 0);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/vnet/unix/gdb_funcs.c b/src/vnet/unix/gdb_funcs.c
index 3f2d54d..fc61c54 100644
--- a/src/vnet/unix/gdb_funcs.c
+++ b/src/vnet/unix/gdb_funcs.c
@@ -249,10 +249,10 @@
     trace_apply_filter(this_vlib_main);
 
     traces = 0;
-    pool_foreach (h, tm->trace_buffer_pool,
-    ({
+    pool_foreach (h, tm->trace_buffer_pool)
+     {
       vec_add1 (traces, h[0]);
-    }));
+    }
 
     if (vec_len (traces) == 0)
       {
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp.c b/src/vnet/vxlan-gbp/vxlan_gbp.c
index a061cc1..d1267cf 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp.c
@@ -929,10 +929,10 @@
     vlib_cli_output (vm, "No vxlan-gbp tunnels configured...");
 
 /* *INDENT-OFF* */
-  pool_foreach (t, vxm->tunnels,
-  ({
+  pool_foreach (t, vxm->tunnels)
+   {
     vlib_cli_output (vm, "%U", format_vxlan_gbp_tunnel, t);
-  }));
+  }
 /* *INDENT-ON* */
 
   if (raw)
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp_api.c b/src/vnet/vxlan-gbp/vxlan_gbp_api.c
index 17a1984..2cac7f5 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp_api.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp_api.c
@@ -189,10 +189,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, vxm->tunnels,
-      ({
+      pool_foreach (t, vxm->tunnels)
+       {
         send_vxlan_gbp_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c
index 979d98c..e5ca4ec 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.c
@@ -998,10 +998,10 @@
     vlib_cli_output (vm, "No vxlan-gpe tunnels configured.");
 
   /* *INDENT-OFF* */
-  pool_foreach (t, ngm->tunnels,
-  ({
+  pool_foreach (t, ngm->tunnels)
+   {
     vlib_cli_output (vm, "%U", format_vxlan_gpe_tunnel, t);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe_api.c b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
index 7d484c1..711ee66 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe_api.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
@@ -190,10 +190,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, vgm->tunnels,
-      ({
+      pool_foreach (t, vgm->tunnels)
+       {
         send_vxlan_gpe_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c
index 742103a..bf205ad 100644
--- a/src/vnet/vxlan/vxlan.c
+++ b/src/vnet/vxlan/vxlan.c
@@ -862,10 +862,10 @@
     vlib_cli_output (vm, "No vxlan tunnels configured...");
 
 /* *INDENT-OFF* */
-  pool_foreach (t, vxm->tunnels,
-  ({
+  pool_foreach (t, vxm->tunnels)
+   {
     vlib_cli_output (vm, "%U", format_vxlan_tunnel, t);
-  }));
+  }
 /* *INDENT-ON* */
 
   if (raw)
diff --git a/src/vnet/vxlan/vxlan_api.c b/src/vnet/vxlan/vxlan_api.c
index 8e5b346..0e51f3d 100644
--- a/src/vnet/vxlan/vxlan_api.c
+++ b/src/vnet/vxlan/vxlan_api.c
@@ -232,10 +232,10 @@
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, vxm->tunnels,
-      ({
+      pool_foreach (t, vxm->tunnels)
+       {
         send_vxlan_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c
index 25dcc03..6007b72 100644
--- a/src/vpp/api/api.c
+++ b/src/vpp/api/api.c
@@ -581,7 +581,7 @@
     svm_queue_t * q;                                     \
                                                                         \
     /* One registration only... */                                      \
-    pool_foreach(reg, vam->nn##_registrations,                          \
+    pool_foreach (reg, vam->nn##_registrations)                          \
     ({                                                                  \
         q = vl_api_client_index_to_input_queue (reg->client_index);     \
         if (q) {                                                        \
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c
index 0b5ea30..43a4870 100644
--- a/src/vpp/stats/stat_segment.c
+++ b/src/vpp/stats/stat_segment.c
@@ -667,10 +667,10 @@
 
   /* *INDENT-OFF* */
   stat_segment_gauges_pool_t *g;
-  pool_foreach(g, sm->gauges,
-  ({
+  pool_foreach (g, sm->gauges)
+   {
     g->fn(&sm->directory_vector[g->directory_index], g->caller_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Heartbeat, so clients detect we're still here */
diff --git a/src/vppinfra/graph.c b/src/vppinfra/graph.c
index 3f8a3e8..4c92f8e 100644
--- a/src/vppinfra/graph.c
+++ b/src/vppinfra/graph.c
@@ -160,14 +160,14 @@
 
   s = format (s, "graph %d nodes", pool_elts (g->nodes));
   /* *INDENT-OFF* */
-  pool_foreach (n, g->nodes, ({
+  pool_foreach (n, g->nodes)  {
     s = format (s, "\n%U", format_white_space, indent + 2);
     s = format (s, "%U -> ", format_graph_node, g, n - g->nodes);
     vec_foreach (l, n->next.links)
       s = format (s, "%U (%d), ",
 		  format_graph_node, g, l->node_index,
 		  l->distance);
-  }));
+  }
   /* *INDENT-ON* */
 
   return s;
diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c
index b92dbf3..546a4fe 100644
--- a/src/vppinfra/pmalloc.c
+++ b/src/vppinfra/pmalloc.c
@@ -643,7 +643,7 @@
 
 
   /* *INDENT-OFF* */
-  pool_foreach (a, pm->arenas,
+  pool_foreach (a, pm->arenas)
     {
       u32 *page_index;
       s = format (s, "\n%Uarena '%s' pages %u subpage-size %U numa-node %u",
@@ -659,7 +659,7 @@
 	    s = format (s, "\n%U%U", format_white_space, indent + 4,
 			format_pmalloc_page, pp, verbose);
 	  }
-    });
+    }
   /* *INDENT-ON* */
 
   return s;
diff --git a/src/vppinfra/pool.h b/src/vppinfra/pool.h
index d7be8cb..116c1cd 100644
--- a/src/vppinfra/pool.h
+++ b/src/vppinfra/pool.h
@@ -524,14 +524,14 @@
     vec_foreach() (or plain for-loop) to walk the active index vector.
  */
 
-#define pool_foreach2(VAR,POOL)						\
+#define pool_foreach(VAR,POOL)						\
   if (POOL)								\
     for (VAR = POOL + pool_get_first_index (POOL);			\
 	 VAR < vec_end (POOL);						\
 	 VAR = POOL + pool_get_next_index (POOL, VAR - POOL))
 
-#define pool_foreach(VAR,POOL,BODY)					\
-  pool_foreach2(VAR,POOL)						\
+#define pool_foreach_old(VAR,POOL,BODY)					\
+  pool_foreach(VAR,POOL)						\
    { BODY; }
 
 /** Returns pointer to element at given index.
@@ -566,15 +566,15 @@
   _pool_var(rv);                                                        \
 })
 
-#define pool_foreach_index2(i,v)		\
+#define pool_foreach_index(i,v)		\
   if (v)					\
     for (i = pool_get_first_index (v);		\
 	 i < vec_len (v);			\
 	 i = pool_get_next_index (v, i))	\
 
 /** Iterate pool by index. */
-#define pool_foreach_index(i,v,body)		\
-  pool_foreach_index2 (i,v)			\
+#define pool_foreach_index_old(i,v,body)		\
+  pool_foreach_index (i,v)			\
 	{ body; }
 
 /**
@@ -589,10 +589,10 @@
 {                                                       \
   uword *_pool_var(ii), *_pool_var(dv) = NULL;          \
                                                         \
-  pool_foreach((VAR), (POOL),                           \
-  ({                                                    \
+  pool_foreach((VAR), (POOL))                          \
+  {                                                     \
     vec_add1(_pool_var(dv), (VAR) - (POOL));            \
-  }));                                                  \
+  }                                                     \
   vec_foreach(_pool_var(ii), _pool_var(dv))             \
   {                                                     \
     (VAR) = pool_elt_at_index((POOL), *_pool_var(ii));  \
diff --git a/src/vppinfra/test_pool_iterate.c b/src/vppinfra/test_pool_iterate.c
index 4e8e2df..bcbd235 100644
--- a/src/vppinfra/test_pool_iterate.c
+++ b/src/vppinfra/test_pool_iterate.c
@@ -78,8 +78,8 @@
   while (next != ~0);
 
   /* *INDENT-OFF* */
-  pool_foreach (junk, tp,
-  ({
+  pool_foreach (junk, tp)
+   {
     int is_free;
 
     is_free = pool_is_free_index (tp, junk - tp);
@@ -93,7 +93,7 @@
           if (i != 1 && i != 65)
             clib_warning ("oops, busy index %d reported free", i);
         }
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
diff --git a/src/vppinfra/test_tw_timer.c b/src/vppinfra/test_tw_timer.c
index 499cc01..47e5e49 100644
--- a/src/vppinfra/test_tw_timer.c
+++ b/src/vppinfra/test_tw_timer.c
@@ -317,13 +317,13 @@
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_2t_1w_2048sl (&tm->single_wheel, e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -375,12 +375,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -456,13 +456,13 @@
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_16t_2w_512sl (&tm->double_wheel, e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -513,12 +513,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -591,8 +591,8 @@
       j = 0;
 
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         expiration_time = get_expiration_time (tm);
         max_expiration_time = clib_max (expiration_time, max_expiration_time);
 	e->expected_to_expire = expiration_time
@@ -601,7 +601,7 @@
                                       expiration_time);
         if (++j >= tm->ntimers / 4)
           goto done;
-      }));
+      }
       /* *INDENT-ON* */
 
     done:
@@ -624,12 +624,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -707,13 +707,13 @@
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_4t_3w_256sl (&tm->triple_wheel, e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -764,12 +764,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -847,14 +847,14 @@
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_1t_3w_1024sl_ov (&tm->triple_ov_wheel,
                                        e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -905,8 +905,8 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     TWT (tw_timer) * t;
 
     fformat (stdout, "[%d] expected to expire %d\n",
@@ -914,7 +914,7 @@
              e->expected_to_expire);
     t = pool_elt_at_index (tm->triple_ov_wheel.timers, e->stop_timer_handle);
     fformat (stdout, "  expiration_time %lld\n", t->expiration_time);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -973,12 +973,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat(stdout, "[%d] expected to expire %d\n",
                      e - tm->test_elts,
                      e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   fformat (stdout,
@@ -1031,12 +1031,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat(stdout, "[%d] expected to expire %d\n",
                      e - tm->test_elts,
                      e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   fformat (stdout,
@@ -1089,12 +1089,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat(stdout, "[%d] expected to expire %d\n",
                      e - tm->test_elts,
                      e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   fformat (stdout,
@@ -1169,12 +1169,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -1253,12 +1253,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -1337,12 +1337,12 @@
 	     pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
diff --git a/src/vppinfra/timing_wheel.c b/src/vppinfra/timing_wheel.c
index bbf3012..a6c476b 100644
--- a/src/vppinfra/timing_wheel.c
+++ b/src/vppinfra/timing_wheel.c
@@ -314,10 +314,10 @@
       {
 	timing_wheel_overflow_elt_t *oe;
 	/* *INDENT-OFF* */
-	pool_foreach (oe, w->overflow_pool, ({
+	pool_foreach (oe, w->overflow_pool)  {
 	  if (oe->user_data == user_data)
 	    pool_put (w->overflow_pool, oe);
-	}));
+	}
 	/* *INDENT-ON* */
       }
 
@@ -398,8 +398,8 @@
       min_t = w->cpu_time_base + min_dt;
 
     /* *INDENT-OFF* */
-    pool_foreach (oe, w->overflow_pool,
-		  ({ min_t = clib_min (min_t, oe->cpu_time); }));
+    pool_foreach (oe, w->overflow_pool)
+		   { min_t = clib_min (min_t, oe->cpu_time); }
     /* *INDENT-ON* */
 
   done:
@@ -503,7 +503,7 @@
   {
     timing_wheel_overflow_elt_t *oe;
     /* *INDENT-OFF* */
-    pool_foreach (oe, w->overflow_pool, ({
+    pool_foreach (oe, w->overflow_pool)  {
       /* It fits now into 32 bits. */
       if (0 == ((oe->cpu_time - w->cpu_time_base) >> BITS (e->cpu_time_relative_to_base)))
 	{
@@ -520,7 +520,7 @@
 	    timing_wheel_insert_helper (w, oe->cpu_time, oe->user_data);
 	  pool_put (w->overflow_pool, oe);
 	}
-    }));
+    }
     /* *INDENT-ON* */
   }
   return expired_user_data;
