public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: stephen@networkplumber.org
Cc: jhs@mojatatu.com, netdev@vger.kernel.org,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH iproute2] tc: minor cleanup on ingress
Date: Sat,  9 May 2015 22:59:17 +0200	[thread overview]
Message-ID: <03841b5cf59f51cffe7cd6ccced1c8426b484ea9.1431204884.git.daniel@iogearbox.net> (raw)

Fix whitespacing and remove the unnecessary condition.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
 tc/q_ingress.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/tc/q_ingress.c b/tc/q_ingress.c
index ba58e72..30b24e7 100644
--- a/tc/q_ingress.c
+++ b/tc/q_ingress.c
@@ -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;
 }
 
-- 
1.9.3

             reply	other threads:[~2015-05-09 20:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 20:59 Daniel Borkmann [this message]
2015-05-11 16:18 ` [PATCH iproute2] tc: minor cleanup on ingress Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03841b5cf59f51cffe7cd6ccced1c8426b484ea9.1431204884.git.daniel@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox