]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: avoid exit in case of error.
authordavid decotigny <ddecotig@gmail.com>
Fri, 11 Nov 2016 18:55:36 +0000 (10:55 -0800)
committerStephen Hemminger <sthemmin@microsoft.com>
Tue, 29 Nov 2016 20:44:30 +0000 (12:44 -0800)
Be consistent with how non-0 print_route() return values are handled
elesewhere: return -1.

ip/iproute.c

index 98bfad6cb7bc09b726501de810baf96906296428..dae793b7538fd984de251231e9e367eb641217c8 100644 (file)
@@ -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) {