* [PATCH iproute2] tc/htb: remove unused variable
@ 2018-08-30 14:38 Florent Fourcot
2018-08-30 15:01 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Florent Fourcot @ 2018-08-30 14:38 UTC (permalink / raw)
To: netdev; +Cc: Florent Fourcot
Since introduction of htb module, this variable has never been used.
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] tc/htb: remove unused variable
2018-08-30 14:38 [PATCH iproute2] tc/htb: remove unused variable Florent Fourcot
@ 2018-08-30 15:01 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-08-30 15:01 UTC (permalink / raw)
To: Florent Fourcot; +Cc: netdev
On Thu, 30 Aug 2018 16:38:54 +0200
Florent Fourcot <florent.fourcot@wifirst.fr> wrote:
> Since introduction of htb module, this variable has never been used.
>
> Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Looks good. Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-30 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 14:38 [PATCH iproute2] tc/htb: remove unused variable Florent Fourcot
2018-08-30 15:01 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.