vppinfra: refactor *_will_expand() functions
[vpp.git] / src / vnet / fib / fib_urpf_list.c
index f9790b5..55f3b8a 100644 (file)
@@ -55,11 +55,10 @@ index_t
 fib_urpf_list_alloc_and_lock (void)
 {
     fib_urpf_list_t *urpf;
-    u8 need_barrier_sync = 0;
+    u8 need_barrier_sync = pool_get_will_expand (fib_urpf_list_pool);
     vlib_main_t *vm = vlib_get_main();
     ASSERT (vm->thread_index == 0);
 
-    pool_get_will_expand (fib_urpf_list_pool, need_barrier_sync );
     if (need_barrier_sync)
         vlib_worker_thread_barrier_sync (vm);