summaryrefslogtreecommitdiffstats
path: root/plugins/snat-plugin/snat/in2out.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2016-11-28 05:36:24 -0800
committerMatus Fabian <matfabia@cisco.com>2016-11-28 05:36:24 -0800
commit38fb44f51d73f631df82830b4a09681fb2e41a3c (patch)
treece731a25d7bd9977bb6aae5a342cc835cfc1d196 /plugins/snat-plugin/snat/in2out.c
parent985f3d11fae7f93eb9a9e96d59b8e7a066819672 (diff)
snat: fix coverity issues
Change-Id: Icb8239c02af8758a9e4bf299726a89677f53451d Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'plugins/snat-plugin/snat/in2out.c')
-rw-r--r--plugins/snat-plugin/snat/in2out.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/snat-plugin/snat/in2out.c b/plugins/snat-plugin/snat/in2out.c
index e1edbb81581..43ee2d0e75a 100644
--- a/plugins/snat-plugin/snat/in2out.c
+++ b/plugins/snat-plugin/snat/in2out.c
@@ -1047,6 +1047,8 @@ snat_in2out_worker_handoff_fn (vlib_main_t * vm,
u32 current_worker_index = ~0;
u32 cpu_index = os_get_cpu_number ();
+ ASSERT (vec_len (sm->workers));
+
if (PREDICT_FALSE (handoff_queue_elt_by_worker_index == 0))
{
vec_validate (handoff_queue_elt_by_worker_index, tm->n_vlib_mains - 1);