aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2016-11-22 09:15:01 +0100
committerPavel Kotucek <pkotucek@cisco.com>2016-11-22 11:45:46 +0100
commited1c1835043a1d266a5928c40f41b340f6c968d7 (patch)
treeb7f7cc45214a6b30a13112393a7014b7022fcff1
parent2be95c11966af3531ad3d77a6186e300b94f6cb9 (diff)
Fix issues reported by coverity
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com> Change-Id: I5d8c542fd283f86c325200f3caab56294393cedf
-rw-r--r--vpp/vpp-api/api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index ad5d43be079..330b9159e19 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -8628,6 +8628,9 @@ vl_api_sw_interface_span_dump_t_handler (vl_api_sw_interface_span_dump_t * mp)
u32 src_sw_if_index = 0, *dst_sw_if_index;
q = vl_api_client_index_to_input_queue (mp->client_index);
+ if (!q)
+ return;
+
vec_foreach (dst_sw_if_index, sm->dst_by_src_sw_if_index)
{
if (*dst_sw_if_index > 0)
@@ -9184,7 +9187,6 @@ vl_api_feature_enable_disable_t_handler (vl_api_feature_enable_disable_t * mp)
u8 *arc_name = format (0, "%s%c", mp->arc_name, 0);
u8 *feature_name = format (0, "%s%c", mp->feature_name, 0);
- u32 sw_if_index = ntohl (mp->sw_if_index);
vnet_feature_registration_t *reg;
reg =
@@ -9194,8 +9196,10 @@ vl_api_feature_enable_disable_t_handler (vl_api_feature_enable_disable_t * mp)
rv = VNET_API_ERROR_INVALID_VALUE;
else
{
+ u32 sw_if_index;
clib_error_t *error = 0;
+ sw_if_index = ntohl (mp->sw_if_index);
if (reg->enable_disable_cb)
error = reg->enable_disable_cb (sw_if_index, mp->enable);
if (!error)