fix isssues discovered by coverity scan
Change-Id: I62deaaa47a9259c886efa702eb4279c1c481585f Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Chris Luke

parent
275b146bc1
commit
109cd50261
@ -153,7 +153,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
|
|||||||
|
|
||||||
while (r && n_left_to_next)
|
while (r && n_left_to_next)
|
||||||
{
|
{
|
||||||
vlib_buffer_t *b0 = 0, *first_b0 = 0;
|
vlib_buffer_t *first_b0 = 0;
|
||||||
u32 offset = 0;
|
u32 offset = 0;
|
||||||
u32 bi0 = 0, first_bi0 = 0, prev_bi0;
|
u32 bi0 = 0, first_bi0 = 0, prev_bi0;
|
||||||
u32 next_slot_index = (cur_slot_index + 1) % ring->num_slots;
|
u32 next_slot_index = (cur_slot_index + 1) % ring->num_slots;
|
||||||
@ -171,6 +171,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
|
|||||||
|
|
||||||
while (data_len && n_free_bufs)
|
while (data_len && n_free_bufs)
|
||||||
{
|
{
|
||||||
|
vlib_buffer_t *b0;
|
||||||
/* grab free buffer */
|
/* grab free buffer */
|
||||||
u32 last_empty_buffer =
|
u32 last_empty_buffer =
|
||||||
vec_len (nm->rx_buffers[cpu_index]) - 1;
|
vec_len (nm->rx_buffers[cpu_index]) - 1;
|
||||||
@ -233,7 +234,7 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
|
|||||||
|
|
||||||
/* redirect if feature path enabled */
|
/* redirect if feature path enabled */
|
||||||
vnet_feature_start_device_input_x1 (nif->sw_if_index, &next0,
|
vnet_feature_start_device_input_x1 (nif->sw_if_index, &next0,
|
||||||
b0, 0);
|
first_b0, 0);
|
||||||
|
|
||||||
/* enque and take next packet */
|
/* enque and take next packet */
|
||||||
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
|
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
|
||||||
|
@ -175,7 +175,7 @@ vnet_feature_enable_disable (const char *arc_name, const char *node_name,
|
|||||||
|
|
||||||
arc_index = vnet_get_feature_arc_index (arc_name);
|
arc_index = vnet_get_feature_arc_index (arc_name);
|
||||||
|
|
||||||
if (arc_index == ~0)
|
if (arc_index == ~(u8) 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cm = &fm->feature_config_mains[arc_index];
|
cm = &fm->feature_config_mains[arc_index];
|
||||||
|
Reference in New Issue
Block a user