lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1439452095-5253-1-git-send-email-zhangshengju@cmss.chinamobile.com>
Date:	Thu, 13 Aug 2015 07:48:15 +0000
From:	Zhang Shengju <zhangshengju@...s.chinamobile.com>
To:	netdev@...r.kernel.org
Subject: [PATCH iproute2] ip-link: remove unnecessary return

Remove unnecessary retrun, because invarg() exit.

Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
---
 ip/iplink_bridge.c | 30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)

diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index e704e29..61e4cda 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -42,47 +42,41 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
 	while (argc > 0) {
 		if (matches(*argv, "forward_delay") == 0) {
 			NEXT_ARG();
-			if (get_u32(&val, *argv, 0)) {
+			if (get_u32(&val, *argv, 0))
 				invarg("invalid forward_delay", *argv);
-				return -1;
-			}
+
 			addattr32(n, 1024, IFLA_BR_FORWARD_DELAY, val);
 		} else if (matches(*argv, "hello_time") == 0) {
 			NEXT_ARG();
-			if (get_u32(&val, *argv, 0)) {
+			if (get_u32(&val, *argv, 0))
 				invarg("invalid hello_time", *argv);
-				return -1;
-			}
+
 			addattr32(n, 1024, IFLA_BR_HELLO_TIME, val);
 		} else if (matches(*argv, "max_age") == 0) {
 			NEXT_ARG();
-			if (get_u32(&val, *argv, 0)) {
+			if (get_u32(&val, *argv, 0))
 				invarg("invalid max_age", *argv);
-				return -1;
-			}
+
 			addattr32(n, 1024, IFLA_BR_MAX_AGE, val);
 		} else if (matches(*argv, "ageing_time") == 0) {
 			NEXT_ARG();
-			if (get_u32(&val, *argv, 0)) {
+			if (get_u32(&val, *argv, 0))
 				invarg("invalid ageing_time", *argv);
-				return -1;
-			}
+
 			addattr32(n, 1024, IFLA_BR_AGEING_TIME, val);
 		} else if (matches(*argv, "stp_state") == 0) {
 			NEXT_ARG();
-			if (get_u32(&val, *argv, 0)) {
+			if (get_u32(&val, *argv, 0))
 				invarg("invalid stp_state", *argv);
-				return -1;
-			}
+
 			addattr32(n, 1024, IFLA_BR_STP_STATE, val);
 		} else if (matches(*argv, "priority") == 0) {
 			__u16 prio;
 
 			NEXT_ARG();
-			if (get_u16(&prio, *argv, 0)) {
+			if (get_u16(&prio, *argv, 0))
 				invarg("invalid priority", *argv);
-				return -1;
-			}
+
 			addattr16(n, 1024, IFLA_BR_PRIORITY, prio);
 		} else if (matches(*argv, "help") == 0) {
 			explain();
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ