misc: move to new pool_foreach macros
[vpp.git] / src / vnet / bier / bier_table.c
index a9f8a6d..4383053 100644 (file)
@@ -779,9 +779,12 @@ bier_table_ecmp_walk (index_t bti,
 
     bt = bier_table_get(bti);
 
-    fib_path_list_walk(bt->bt_pl,
-                       bier_table_ecmp_walk_path_list,
-                       &ewc);
+    if (FIB_NODE_INDEX_INVALID != bt->bt_pl)
+    {
+        fib_path_list_walk(bt->bt_pl,
+                           bier_table_ecmp_walk_path_list,
+                           &ewc);
+    }
 }
 
 void
@@ -906,10 +909,10 @@ bier_table_show_all (vlib_main_t * vm,
     {
         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);
-        }));
+        }
     }
 }