Skip to content

Commit

Permalink
examples/qos_sched: fix negative loop bound in option parsing
Browse files Browse the repository at this point in the history
negative_returns: Using unsigned variable n_tokens in a loop exit condition.

Coverity issue: 30704
Fixes: de3cfa2 ("sched: initial import")

Signed-off-by: Slawomir Mrozowicz <[email protected]>
Acked-by: Cristian Dumitrescu <[email protected]>
  • Loading branch information
smrozowx authored and Thomas Monjalon committed May 16, 2016
1 parent 035b6a4 commit cb92340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/qos_sched/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cb92340

Please sign in to comment.