From: david decotigny Date: Fri, 11 Nov 2016 18:55:36 +0000 (-0800) Subject: iproute2: avoid exit in case of error. X-Git-Tag: v4.9.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8be295581630b01a2b8ec718ccde2d158fcff4c8;p=thirdparty%2Fiproute2.git iproute2: avoid exit in case of error. Be consistent with how non-0 print_route() return values are handled elesewhere: return -1. --- diff --git a/ip/iproute.c b/ip/iproute.c index 98bfad6cb..dae793b75 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -1743,7 +1743,7 @@ static int iproute_get(int argc, char **argv) if (print_route(NULL, &req.n, (void *)stdout) < 0) { fprintf(stderr, "An error :-)\n"); - exit(1); + return -1; } if (req.n.nlmsg_type != RTM_NEWROUTE) {