summaryrefslogtreecommitdiffstats
path: root/src/vlib/node_funcs.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-07-28 12:57:15 +0200
committerDamjan Marion <damarion@cisco.com>2023-07-28 12:57:24 +0200
commitc5c0d0cf8ab30b29ab72e0933d32259e32d9c95a (patch)
treec9134e661e00e41b84f36ecb72b2fb6d3c809570 /src/vlib/node_funcs.h
parent229dab615a5cc652432dfe3b34091fc0663c3068 (diff)
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>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r--src/vlib/node_funcs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index 66f079c0547..37f7538d70a 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -252,14 +252,17 @@ vlib_node_set_interrupt_pending (vlib_main_t *vm, u32 node_index)
{
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);