diff options
author | Tetsuya Murakami <tetsuya.mrk@gmail.com> | 2020-04-07 13:59:26 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-04-08 07:59:25 +0000 |
commit | 6e8e10f79f8543ee60b5474932cda492abe48990 (patch) | |
tree | 0b9b718e9dab8e6a1aec659c7cdfb53b8ee106f4 /src/vnet/srv6/sr_localsid.c | |
parent | ae16a98199768f6dc6b19a3197df122418e458d2 (diff) |
sr: Fix the coverity issue
Fix the coverity issue on srv/vnet/srv6/sr_localsid.c
Type: fix
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I4aeef31cfd67cc1801ab57b94bf4f5ff3d13fd49
Diffstat (limited to 'src/vnet/srv6/sr_localsid.c')
-rwxr-xr-x | src/vnet/srv6/sr_localsid.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c index 82f5e3b7c1e..67e80051081 100755 --- a/src/vnet/srv6/sr_localsid.c +++ b/src/vnet/srv6/sr_localsid.c @@ -2201,27 +2201,19 @@ sr_localsid_un_perf_fn (vlib_main_t * vm, vlib_node_runtime_t * node, } vlib_increment_combined_counter - (((next0 == - SR_LOCALSID_NEXT_ERROR) ? &(sm->sr_ls_invalid_counters) : - &(sm->sr_ls_valid_counters)), thread_index, ls0 - sm->localsids, + (&(sm->sr_ls_valid_counters), thread_index, ls0 - sm->localsids, 1, vlib_buffer_length_in_chain (vm, b0)); vlib_increment_combined_counter - (((next1 == - SR_LOCALSID_NEXT_ERROR) ? &(sm->sr_ls_invalid_counters) : - &(sm->sr_ls_valid_counters)), thread_index, ls1 - sm->localsids, + (&(sm->sr_ls_valid_counters), thread_index, ls1 - sm->localsids, 1, vlib_buffer_length_in_chain (vm, b1)); vlib_increment_combined_counter - (((next2 == - SR_LOCALSID_NEXT_ERROR) ? &(sm->sr_ls_invalid_counters) : - &(sm->sr_ls_valid_counters)), thread_index, ls2 - sm->localsids, + (&(sm->sr_ls_valid_counters), thread_index, ls2 - sm->localsids, 1, vlib_buffer_length_in_chain (vm, b2)); vlib_increment_combined_counter - (((next3 == - SR_LOCALSID_NEXT_ERROR) ? &(sm->sr_ls_invalid_counters) : - &(sm->sr_ls_valid_counters)), thread_index, ls3 - sm->localsids, + (&(sm->sr_ls_valid_counters), thread_index, ls3 - sm->localsids, 1, vlib_buffer_length_in_chain (vm, b3)); vlib_validate_buffer_enqueue_x4 (vm, node, next_index, to_next, @@ -2267,9 +2259,7 @@ sr_localsid_un_perf_fn (vlib_main_t * vm, vlib_node_runtime_t * node, } vlib_increment_combined_counter - (((next0 == - SR_LOCALSID_NEXT_ERROR) ? &(sm->sr_ls_invalid_counters) : - &(sm->sr_ls_valid_counters)), thread_index, ls0 - sm->localsids, + (&(sm->sr_ls_valid_counters), thread_index, ls0 - sm->localsids, 1, vlib_buffer_length_in_chain (vm, b0)); vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, |