qfq: fix parse_opt dead code

Fix Coverity warning from dead code.
This commit is contained in:
Stephen Hemminger 2015-10-27 15:46:20 +09:00
parent 8fe9839857
commit 037660b351
1 changed files with 4 additions and 9 deletions

View File

@ -38,16 +38,11 @@ static void explain_class(void)
static int qfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, static int qfq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
struct nlmsghdr *n) struct nlmsghdr *n)
{ {
while (argc > 0) { if (argc > 0) {
if (matches(*argv, "help") == 0) { if (matches(*argv, "help") != 0)
explain();
return -1;
} else {
fprintf(stderr, "What is \"%s\"?\n", *argv); fprintf(stderr, "What is \"%s\"?\n", *argv);
explain(); explain();
return -1; return -1;
}
argc--; argv++;
} }
return 0; return 0;