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;
 
