Commit f921f567 authored by Roopa Prabhu's avatar Roopa Prabhu Committed by Stephen Hemminger

iplink: replace exit with return

This patch replaces exits with returns in iplink
command. Helps to continue on errors when
invoked with ip -force -batch.
Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
parent de7db5d8
...@@ -710,7 +710,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv) ...@@ -710,7 +710,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
req.i.ifi_index = 0; req.i.ifi_index = 0;
addattr32(&req.n, sizeof(req), IFLA_GROUP, group); addattr32(&req.n, sizeof(req), IFLA_GROUP, group);
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0) if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
exit(2); return -2;
return 0; return 0;
} }
} }
...@@ -809,7 +809,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv) ...@@ -809,7 +809,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
} }
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0) if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
exit(2); return -2;
return 0; return 0;
} }
......
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