From: Neale Ranns Date: Mon, 19 Mar 2018 09:39:45 +0000 (-0700) Subject: QoS code coverity found errors X-Git-Tag: v18.04-rc1~102 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=9a1f49ef30c6c07ce1254fa57a3d024f9b05f523;p=vpp.git QoS code coverity found errors Change-Id: I6b125b79bdc560bfb81f307367c844b6a5af6368 Signed-off-by: Neale Ranns --- diff --git a/src/vnet/qos/qos_api.c b/src/vnet/qos/qos_api.c index cdb9e46ea36..e2393137d15 100644 --- a/src/vnet/qos/qos_api.c +++ b/src/vnet/qos/qos_api.c @@ -55,7 +55,7 @@ vl_api_qos_record_enable_disable_t_handler (vl_api_qos_record_enable_disable_t vl_api_qos_record_enable_disable_reply_t *rmp; int rv = 0; - if (mp->input_source > QOS_N_SOURCES) + if (mp->input_source >= QOS_N_SOURCES) rv = VNET_API_ERROR_INVALID_VALUE; else { @@ -101,7 +101,7 @@ void vl_api_qos_mark_enable_disable_reply_t *rmp; int rv = 0; - if (mp->output_source > QOS_N_SOURCES) + if (mp->output_source >= QOS_N_SOURCES) rv = VNET_API_ERROR_INVALID_VALUE; else {