From a5160d7d1f0dda554960e1f0e9f7074bda256baa Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 13 Mar 2019 15:29:15 -0400 Subject: VPP-1576: fix a set of coverity warnings Change-Id: Ifd34aed8692d5acaa370d4976d974ac573e43705 Signed-off-by: Dave Barach --- src/plugins/ct6/ct6.c | 3 +++ src/plugins/unittest/session_test.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/ct6/ct6.c b/src/plugins/ct6/ct6.c index dc2b7357d63..a150cbc4381 100644 --- a/src/plugins/ct6/ct6.c +++ b/src/plugins/ct6/ct6.c @@ -196,6 +196,8 @@ static void vl_api_ct6_enable_disable_t_handler ct6_main_t *cmp = &ct6_main; int rv; + VALIDATE_SW_IF_INDEX (mp); + if (mp->is_inside) rv = ct6_in2out_enable_disable (cmp, ntohl (mp->sw_if_index), (int) (mp->enable_disable)); @@ -203,6 +205,7 @@ static void vl_api_ct6_enable_disable_t_handler rv = ct6_out2in_enable_disable (cmp, ntohl (mp->sw_if_index), (int) (mp->enable_disable)); + BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_CT6_ENABLE_DISABLE_REPLY); } diff --git a/src/plugins/unittest/session_test.c b/src/plugins/unittest/session_test.c index 5ad6563ed62..fa6a99ffbf0 100644 --- a/src/plugins/unittest/session_test.c +++ b/src/plugins/unittest/session_test.c @@ -1782,6 +1782,9 @@ session_test_mq (vlib_main_t * vm, unformat_input_t * input) options[APP_OPTIONS_EVT_QUEUE_SIZE] = 2048; reg = vl_api_client_index_to_registration (api_index); + /* Shut up coverity */ + if (reg == 0) + abort (); if (!session_main.evt_qs_use_memfd_seg) reg->clib_file_index = VL_API_INVALID_FI; -- cgit 1.2.3-korg