From 38fb44f51d73f631df82830b4a09681fb2e41a3c Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Mon, 28 Nov 2016 05:36:24 -0800 Subject: snat: fix coverity issues Change-Id: Icb8239c02af8758a9e4bf299726a89677f53451d Signed-off-by: Matus Fabian --- plugins/snat-plugin/snat/in2out.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/snat-plugin/snat/in2out.c') 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); -- cgit 1.2.3-korg