vrrp: fix vrrp_garp_or_na_send()'s memory leak
[vpp.git] / src / plugins / nsh / nsh_cli.c
index 8bebb72..4288a96 100644 (file)
@@ -140,15 +140,13 @@ nsh_get_adj_by_sw_if_index (u32 sw_if_index)
 {
   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;
 }
@@ -290,7 +288,6 @@ nsh_add_del_map_command_fn (vlib_main_t * vm,
   return 0;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (create_nsh_map_command, static) = {
   .path = "create nsh map",
   .short_help =
@@ -299,7 +296,6 @@ VLIB_CLI_COMMAND (create_nsh_map_command, static) = {
     " encap-vxlan4-intf <nn> | encap-vxlan6-intf <nn>| encap-eth-intf <nn> | encap-none]\n",
   .function = nsh_add_del_map_command_fn,
 };
-/* *INDENT-ON* */
 
 /**
  * CLI command for showing the mapping between NSH entries
@@ -314,23 +310,18 @@ show_nsh_map_command_fn (vlib_main_t * vm,
   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;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (show_nsh_map_command, static) = {
   .path = "show nsh map",
   .function = show_nsh_map_command_fn,
 };
-/* *INDENT-ON* */
 
 /**
  * CLI command for adding NSH entry
@@ -497,7 +488,6 @@ nsh_add_del_entry_command_fn (vlib_main_t * vm,
   return 0;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (create_nsh_entry_command, static) = {
   .path = "create nsh entry",
   .short_help =
@@ -505,7 +495,6 @@ VLIB_CLI_COMMAND (create_nsh_entry_command, static) = {
     "  [c1 <nn> c2 <nn> c3 <nn> c4 <nn>] [tlv-ioam-trace] [del]\n",
   .function = nsh_add_del_entry_command_fn,
 };
-/* *INDENT-ON* */
 
 /* format from network order */
 u8 *
@@ -615,26 +604,19 @@ show_nsh_entry_command_fn (vlib_main_t * vm,
   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;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (show_nsh_entry_command, static) = {
   .path = "show nsh entry",
   .function = show_nsh_entry_command_fn,
 };
-/* *INDENT-ON* */
 
 /*
  * fd.io coding-style-patch-verification: ON