diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2016-01-09 16:02:12 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2016-01-11 08:23:27 -0800 |
commit | f921f567d1b9a7d6ad9b99049c7df816c47f92eb (patch) | |
tree | f855e8e0f9d0ab3a6a95a5ecda82126d3481af81 | |
parent | de7db5d85728fe8d9a33fe968427503c164a32c3 (diff) | |
download | android_external_iproute2-f921f567d1b9a7d6ad9b99049c7df816c47f92eb.tar.gz android_external_iproute2-f921f567d1b9a7d6ad9b99049c7df816c47f92eb.tar.bz2 android_external_iproute2-f921f567d1b9a7d6ad9b99049c7df816c47f92eb.zip |
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: Roopa Prabhu <roopa@cumulusnetworks.com>
-rw-r--r-- | ip/iplink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ip/iplink.c b/ip/iplink.c index f30de86..c706d20 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -710,7 +710,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv) req.i.ifi_index = 0; addattr32(&req.n, sizeof(req), IFLA_GROUP, group); if (rtnl_talk(&rth, &req.n, NULL, 0) < 0) - exit(2); + return -2; return 0; } } @@ -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) - exit(2); + return -2; return 0; } |