From 78053e164fbb75c014126a3deff440f165504582 Mon Sep 17 00:00:00 2001 From: Pavel Kotucek Date: Fri, 10 Mar 2017 10:03:59 +0100 Subject: Fix coverity CIDs 161048, 163895 Change-Id: Ic206601413bb366e2a920daf00524e92a47287ef Signed-off-by: Pavel Kotucek --- src/vnet/ipsec/ipsec_api.c | 3 +-- src/vnet/span/node.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c index e37bcceef71..9c4ba526319 100644 --- a/src/vnet/ipsec/ipsec_api.c +++ b/src/vnet/ipsec/ipsec_api.c @@ -209,8 +209,7 @@ static void vl_api_ipsec_sad_add_del_entry_t_handler sa.crypto_key_len = mp->crypto_key_length; clib_memcpy (&sa.crypto_key, mp->crypto_key, sizeof (sa.crypto_key)); /* check for unsupported integ-alg */ - if (mp->integrity_algorithm < IPSEC_INTEG_ALG_NONE || - mp->integrity_algorithm >= IPSEC_INTEG_N_ALG) + if (mp->integrity_algorithm >= IPSEC_INTEG_N_ALG) { clib_warning ("unsupported integ-alg: '%U'", format_ipsec_integ_alg, mp->integrity_algorithm); diff --git a/src/vnet/span/node.c b/src/vnet/span/node.c index eb69c39c917..2a43b6e3f1a 100644 --- a/src/vnet/span/node.c +++ b/src/vnet/span/node.c @@ -69,8 +69,6 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0, u32 i; si0 = vec_elt_at_index (sm->interfaces, sw_if_index0); - if (!si0) - return; if (is_rx != 0 && si0->num_rx_mirror_ports == 0) return; -- cgit 1.2.3-korg