From 9428581019d0d3498e57908dd4616441d24c5003 Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 7 Apr 2005 21:30:16 +0000 Subject: [PATCH] return propper exit codes git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@369 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_tool.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index 9183d93d..7b4d77ee 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -356,15 +356,15 @@ int main(int argc, char *argv[]) if ((myargv = (char **) malloc((argc+1) * sizeof(char *))) == NULL) { perror("malloc"); - return -1; + exit(1); } if ((argc=CreateArgs(argv[0], aLine, argc, myargv)) < 0) { fprintf(stderr, "ERROR: creating arguments\n"); - return -1; + exit(1); } if (HandleInputLine(argc, myargv, stdout)) - return -1; + exit(1); free(myargv); #if HAVE_GETRUSAGE @@ -395,9 +395,7 @@ int main(int argc, char *argv[]) exit(0); } else { - if(HandleInputLine(argc, argv, stderr)) { - return 1; - } + exit(HandleInputLine(argc, argv, stderr)); } return 0; } -- 2.30.2