NAT64: fix coverity (VPP-1032) 38/9838/2
authorMatus Fabian <matfabia@cisco.com>
Thu, 14 Dec 2017 07:15:47 +0000 (23:15 -0800)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 14 Dec 2017 09:48:13 +0000 (09:48 +0000)
CIDs 180713 and 180714

Change-Id: Ia4856d1a62f176e99983f8c82eaa09d5df9d4ca5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
src/plugins/nat/nat64_in2out.c
src/plugins/nat/nat64_out2in.c

index 9f77ca3..7a0bf85 100644 (file)
@@ -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++;
index 1ba73a4..17513c5 100644 (file)
@@ -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++;