public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu•com>
To: Stephen Hemminger <stephen@networkplumber•org>
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: [PATCH: Iproute bridge] remove redundant check
Date: Wed, 16 Oct 2013 10:33:18 -0400	[thread overview]
Message-ID: <525EA3AE.9020501@mojatatu.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]


attached,

cheers,
jamal

[-- Attachment #2: patch-simp1 --]
[-- Type: text/plain, Size: 1038 bytes --]

commit 355c2d4679e81c1e1c2ae12e03b6a2ced5ebb7d0
Author: Jamal Hadi Salim <jhs@mojatatu•com>
Date:   Wed Oct 16 10:30:01 2013 -0400

    [Iproute: bridge] Remove redundant check
    
    Signed-off-by: Jamal Hadi Salim <jhs@mojatatu•com>

diff --git a/bridge/link.c b/bridge/link.c
index 38dfaea..ab4a5d5 100644
--- a/bridge/link.c
+++ b/bridge/link.c
@@ -271,7 +271,7 @@ static int brlink_modify(int argc, char **argv)
 				exit(-1);
 		} else if (strcmp(*argv, "hairpin") == 0) {
 			NEXT_ARG();
-			if (!on_off("hairping", &hairpin, *argv))
+			if (!on_off("hairpin", &hairpin, *argv))
 				exit(-1);
 		} else if (strcmp(*argv, "fastleave") == 0) {
 			NEXT_ARG();
@@ -357,9 +357,7 @@ static int brlink_modify(int argc, char **argv)
 		nest = addattr_nest(&req.n, sizeof(req), IFLA_AF_SPEC);
 
 		addattr16(&req.n, sizeof(req), IFLA_BRIDGE_FLAGS, flags);
-
-		if (mode >= 0)
-			addattr16(&req.n, sizeof(req), IFLA_BRIDGE_MODE, mode);
+		addattr16(&req.n, sizeof(req), IFLA_BRIDGE_MODE, mode);
 
 		addattr_nest_end(&req.n, nest);
 	}

                 reply	other threads:[~2013-10-16 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=525EA3AE.9020501@mojatatu.com \
    --to=jhs@mojatatu$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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