QoS code coverity found errors 05/11205/2
authorNeale Ranns <neale.ranns@cisco.com>
Mon, 19 Mar 2018 09:39:45 +0000 (02:39 -0700)
committerChris Luke <chris_luke@comcast.com>
Mon, 19 Mar 2018 17:10:06 +0000 (17:10 +0000)
Change-Id: I6b125b79bdc560bfb81f307367c844b6a5af6368
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
src/vnet/qos/qos_api.c

index cdb9e46..e239313 100644 (file)
@@ -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
     {