misc: move to new pool_foreach macros
[vpp.git] / src / plugins / nsh / nsh_api.c
index 02675f9..143285e 100644 (file)
@@ -189,12 +189,10 @@ vl_api_nsh_map_dump_t_handler (vl_api_nsh_map_dump_t * mp)
 
   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 @@ vl_api_nsh_entry_dump_t_handler (vl_api_nsh_entry_dump_t * mp)
 
   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
     {
@@ -713,7 +709,7 @@ nsh_api_init (vlib_main_t * vm, nsh_main_t * nm)
   error = nsh_plugin_api_hookup (vm);
 
   /* Add our API messages to the global name_crc hash table */
-  setup_message_id_table (nm, &api_main);
+  setup_message_id_table (nm, vlibapi_get_main ());
 
   vec_free (name);