tc: minor cleanup on ingress

Fix whitespacing and remove the unnecessary condition.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Daniel Borkmann 2015-05-09 22:59:17 +02:00 committed by Stephen Hemminger
parent 3bf5445c5e
commit ec6f5abcea

View File

@ -34,18 +34,14 @@ static void explain(void)
static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
{
if (argc > 0) {
while (argc > 0) {
if (strcmp(*argv, "handle") == 0) {
NEXT_ARG();
argc--; argv++;
} else {
fprintf(stderr, "What is \"%s\"?\n", *argv);
explain();
return -1;
}
while (argc > 0) {
if (strcmp(*argv, "handle") == 0) {
NEXT_ARG();
argc--; argv++;
} else {
fprintf(stderr, "What is \"%s\"?\n", *argv);
explain();
return -1;
}
}
@ -55,8 +51,7 @@ static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv, struc
static int ingress_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
{
fprintf(f, "---------------- ");
fprintf(f, "---------------- ");
return 0;
}