From cb9234082a86069452d796fcf45b6cf54f0afbbe Mon Sep 17 00:00:00 2001 From: Slawomir Mrozowicz Date: Thu, 21 Apr 2016 15:08:11 +0200 Subject: [PATCH] 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 Acked-by: Cristian Dumitrescu --- examples/qos_sched/args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index d819269b46..fc75263c97 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) -- 2.20.1