vlib: fix coverity issue in vlib_node_set_interrupt_pending
Type: fix
Fixes: cc8249c
Change-Id: Iebfbbd1e00782c4097cc840460b5177d18921131
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index 66f079c..37f7538 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -252,14 +252,17 @@
{
vlib_node_main_t *nm = &vm->node_main;
vlib_node_t *n = vec_elt (nm->nodes, node_index);
- void *interrupts;
+ void *interrupts = 0;
if (n->type == VLIB_NODE_TYPE_INPUT)
interrupts = nm->input_node_interrupts;
else if (n->type == VLIB_NODE_TYPE_PRE_INPUT)
interrupts = nm->pre_input_node_interrupts;
else
- ASSERT (0);
+ {
+ ASSERT (0);
+ return;
+ }
if (vm != vlib_get_main ())
clib_interrupt_set_atomic (interrupts, n->runtime_index);