Skip to contentSkip to conversation

remove redundant check

PATCH New Jamal Hadi Salim 1 participant 1 message Oct 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove redundant check

attached,

cheers,
jamal

commit 355c2d4679e81c1e1c2ae12e03b6a2ced5ebb7d0

Author: Jamal Hadi Salim <[email protected]>
Date:   Wed Oct 16 10:30:01 2013 -0400

[Iproute: bridge] Remove redundant check

bridge/link.c +2 -4
index 38dfaea..ab4a5d5 100644
@@ -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);
 	}