summaryrefslogtreecommitdiff
path: root/examples/qos_sched
diff options
context:
space:
mode:
authorSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>2016-04-21 15:08:11 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-05-16 18:49:12 +0200
commitcb9234082a86069452d796fcf45b6cf54f0afbbe (patch)
treeea903f39e719bd18709fa2bc9909dc41d65e32ab /examples/qos_sched
parent035b6a4f4bba4febb66ae607cbae1322f76546d5 (diff)
downloaddpdk-draft-windows-cb9234082a86069452d796fcf45b6cf54f0afbbe.zip
dpdk-draft-windows-cb9234082a86069452d796fcf45b6cf54f0afbbe.tar.gz
dpdk-draft-windows-cb9234082a86069452d796fcf45b6cf54f0afbbe.tar.xz
examples/qos_sched: fix negative loop bound in option parsing
negative_returns: Using unsigned variable n_tokens in a loop exit condition. Coverity issue: 30704 Fixes: de3cfa2c9823 ("sched: initial import") Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Diffstat (limited to 'examples/qos_sched')
-rw-r--r--examples/qos_sched/args.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index d819269..fc75263 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -162,7 +162,7 @@ static int
app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32_t *opt_vals)
{
char *string;
- uint32_t i, n_tokens;
+ int i, n_tokens;
char *tokens[MAX_OPT_VALUES];
if (conf_str == NULL || opt_vals == NULL || n_vals == 0 || n_vals > MAX_OPT_VALUES)