From: Matus Fabian Date: Thu, 14 Dec 2017 07:15:47 +0000 (-0800) Subject: NAT64: fix coverity (VPP-1032) X-Git-Tag: v18.04-rc0~51 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=5e52529adaa3a36402a2cc4f0f364060c5afc014;p=vpp.git NAT64: fix coverity (VPP-1032) CIDs 180713 and 180714 Change-Id: Ia4856d1a62f176e99983f8c82eaa09d5df9d4ca5 Signed-off-by: Matus Fabian --- diff --git a/src/plugins/nat/nat64_in2out.c b/src/plugins/nat/nat64_in2out.c index 9f77ca33fa4..7a0bf85d96c 100644 --- a/src/plugins/nat/nat64_in2out.c +++ b/src/plugins/nat/nat64_in2out.c @@ -1692,6 +1692,8 @@ nat64_in2out_handoff_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, current_worker_index = next_worker_index; } + ASSERT (to_next_worker != 0); + /* enqueue to correct worker thread */ to_next_worker[0] = bi0; to_next_worker++; diff --git a/src/plugins/nat/nat64_out2in.c b/src/plugins/nat/nat64_out2in.c index 1ba73a4f84a..17513c5efb8 100644 --- a/src/plugins/nat/nat64_out2in.c +++ b/src/plugins/nat/nat64_out2in.c @@ -1003,6 +1003,8 @@ nat64_out2in_handoff_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, current_worker_index = next_worker_index; } + ASSERT (to_next_worker != 0); + /* enqueue to correct worker thread */ to_next_worker[0] = bi0; to_next_worker++;