diff mbox

[iproute2,v1,1/2] iproute2: avoid exit in case of error.

Message ID 1478890537-88715-1-git-send-email-ddecotig@gmail.com
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

david decotigny Nov. 11, 2016, 6:55 p.m. UTC
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(-)

Comments

Stephen Hemminger Nov. 29, 2016, 8:46 p.m. UTC | #1
On Fri, 11 Nov 2016 10:55:36 -0800
David Decotigny <ddecotig@gmail.com> wrote:

> 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(-)

Applied, and queued for next push.
Please use Signed-off-by: on future patches.
diff mbox

Patch

diff --git a/ip/iproute.c b/ip/iproute.c
index 98bfad6..dae793b 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) {