From: oetiker Date: Thu, 7 Apr 2005 21:30:16 +0000 (+0000) Subject: return propper exit codes X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a80f247e7d6dc00e9598fa0036ec3ff6022663ac;p=rrdtool.git return propper exit codes git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@369 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 9183d93..7b4d77e 100644 --- a/src/rrd_tool.c +++ b/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; }