Commit 6a9ce30e authored by Zhang Shengju's avatar Zhang Shengju Committed by Stephen Hemminger

ip-link: remove unnecessary return

Remove unnecessary retrun, because invarg() exit.
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
parent 4e972d5e
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment