diff mbox series

[iproute2] tc/htb: remove unused variable

Message ID 20180830143854.24928-1-florent.fourcot@wifirst.fr
State Accepted, archived
Delegated to: stephen hemminger
Headers show
Series [iproute2] tc/htb: remove unused variable | expand

Commit Message

Florent Fourcot Aug. 30, 2018, 2:38 p.m. UTC
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(-)

Comments

Stephen Hemminger Aug. 30, 2018, 3:01 p.m. UTC | #1
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
diff mbox series

Patch

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;