iproute2: Remove unreachable code
This patch removes unreachable, useless code. Signed-off-by: Petr Sabata <contyk@redhat.com>
This commit is contained in:
parent
cbec021913
commit
5582c0cffd
|
|
@ -150,12 +150,6 @@ int main(int argc, char **argv)
|
|||
|
||||
ret = a->parse_genlopt(a, argc-1, argv+1);
|
||||
return ret;
|
||||
|
||||
if (matches(argv[1], "help") == 0)
|
||||
usage();
|
||||
fprintf(stderr, "Object \"%s\" is unknown, try \"genl "
|
||||
"-help\".\n", argv[1]);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ static int cgroup_parse_opt(struct filter_util *qu, char *handle,
|
|||
explain();
|
||||
return -1;
|
||||
}
|
||||
argc--; argv++;
|
||||
}
|
||||
|
||||
tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ static void explain2(void)
|
|||
|
||||
static int drr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
|
||||
{
|
||||
while (argc > 0) {
|
||||
while (argc) {
|
||||
if (strcmp(*argv, "help") == 0) {
|
||||
explain();
|
||||
return -1;
|
||||
|
|
@ -45,7 +45,6 @@ static int drr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nl
|
|||
explain();
|
||||
return -1;
|
||||
}
|
||||
argc--; argv++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static int multiq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
|
|||
{
|
||||
struct tc_multiq_qopt opt;
|
||||
|
||||
if (argc > 0) {
|
||||
if (argc) {
|
||||
if (strcmp(*argv, "help") == 0) {
|
||||
explain();
|
||||
return -1;
|
||||
|
|
@ -55,7 +55,6 @@ static int multiq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
|
|||
explain();
|
||||
return -1;
|
||||
}
|
||||
argc--; argv++;
|
||||
}
|
||||
|
||||
addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
|
||||
|
|
|
|||
Loading…
Reference in New Issue