exit cleanly for `--help`
authorLukas Stabe <ahti333@gmail.com>
Wed, 5 Feb 2014 22:49:09 +0000 (23:49 +0100)
committerEmil Mikulic <emikulic@gmail.com>
Fri, 14 Mar 2014 11:07:37 +0000 (22:07 +1100)
darkhttpd.c

index e16a75c..bc79967 100644 (file)
@@ -923,7 +923,7 @@ static void parse_commandline(const int argc, char *argv[]) {
 
     if ((argc < 2) || (argc == 2 && strcmp(argv[1], "--help") == 0)) {
         usage(argv[0]); /* no wwwroot given */
-        exit(EXIT_FAILURE);
+        exit(EXIT_SUCCESS);
     }
 
     if (getuid() == 0)