[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180830143854.24928-1-florent.fourcot@wifirst.fr>
Date: Thu, 30 Aug 2018 16:38:54 +0200
From: Florent Fourcot <florent.fourcot@...irst.fr>
To: netdev@...r.kernel.org
Cc: Florent Fourcot <florent.fourcot@...irst.fr>
Subject: [PATCH iproute2] tc/htb: remove unused variable
Since introduction of htb module, this variable has never been used.
Signed-off-by: Florent Fourcot <florent.fourcot@...irst.fr>
---
tc/q_htb.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/tc/q_htb.c b/tc/q_htb.c
index b93d31d4..c8b2941d 100644
--- a/tc/q_htb.c
+++ b/tc/q_htb.c
@@ -109,7 +109,6 @@ static int htb_parse_opt(struct qdisc_util *qu, int argc,
static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n, const char *dev)
{
- int ok = 0;
struct tc_htb_opt opt = {};
__u32 rtab[256], ctab[256];
unsigned buffer = 0, cbuffer = 0;
@@ -127,7 +126,6 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
if (get_u32(&opt.prio, *argv, 10)) {
explain1("prio"); return -1;
}
- ok++;
} else if (matches(*argv, "mtu") == 0) {
NEXT_ARG();
if (get_u32(&mtu, *argv, 10)) {
@@ -161,7 +159,6 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
explain1("buffer");
return -1;
}
- ok++;
} else if (matches(*argv, "cburst") == 0 ||
strcmp(*argv, "cbuffer") == 0 ||
strcmp(*argv, "cmaxburst") == 0) {
@@ -170,7 +167,6 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
explain1("cbuffer");
return -1;
}
- ok++;
} else if (strcmp(*argv, "ceil") == 0) {
NEXT_ARG();
if (ceil64) {
@@ -186,7 +182,6 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
explain1("ceil");
return -1;
}
- ok++;
} else if (strcmp(*argv, "rate") == 0) {
NEXT_ARG();
if (rate64) {
@@ -202,7 +197,6 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
explain1("rate");
return -1;
}
- ok++;
} else if (strcmp(*argv, "help") == 0) {
explain();
return -1;
@@ -214,9 +208,6 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, str
argc--; argv++;
}
- /* if (!ok)
- return 0;*/
-
if (!rate64) {
fprintf(stderr, "\"rate\" is required.\n");
return -1;
--
2.11.0
Powered by blists - more mailing lists