From 8be295581630b01a2b8ec718ccde2d158fcff4c8 Mon Sep 17 00:00:00 2001 From: david decotigny Date: Fri, 11 Nov 2016 10:55:36 -0800 Subject: [PATCH] iproute2: avoid exit in case of error. Be consistent with how non-0 print_route() return values are handled elesewhere: return -1. --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.3