memif: Fix uninitialized variable as reported by coverity
[vpp.git] / src / plugins / memif / node.c
index a4b8245..154d244 100644 (file)
@@ -185,7 +185,8 @@ memif_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
   u16 nexts[MEMIF_RX_VECTOR_SZ], *next = nexts;
   u32 _to_next_bufs[MEMIF_RX_VECTOR_SZ], *to_next_bufs = _to_next_bufs, *bi;
   u32 n_rx_packets = 0, n_rx_bytes = 0;
-  u32 n_left, n_left_to_next, next_index;
+  u32 n_left, n_left_to_next;
+  u32 next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
   vlib_buffer_t *b0, *b1, *b2, *b3;
   u32 thread_index = vm->thread_index;
   memif_per_thread_data_t *ptd = vec_elt_at_index (mm->per_thread_data,