From: Roopa Prabhu Date: Sun, 10 Jan 2016 00:02:12 +0000 (-0800) Subject: iplink: replace exit with return X-Git-Tag: v4.4.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f921f567d1b9a7d6ad9b99049c7df816c47f92eb;p=thirdparty%2Fiproute2.git 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 --- diff --git a/ip/iplink.c b/ip/iplink.c index f30de86d1..c706d2089 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; }