]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Return success on version and help argument 887/head
authorHenrik Nilsson <henrik.nilsson@bytequest.se>
Thu, 1 Aug 2019 07:59:17 +0000 (09:59 +0200)
committerHenrik Nilsson <henrik.nilsson@bytequest.se>
Thu, 1 Aug 2019 08:16:37 +0000 (10:16 +0200)
It's not a failure to print version or usage, so use return code
success.

shairport.c

index cc1a790f21fa502063daa9a1f01859cd930a636c..d458516d946003aac31956776f70689775dadc80 100644 (file)
@@ -1366,13 +1366,13 @@ int main(int argc, char **argv) {
   /* Check if we are called with -V or --version parameter */
   if (argc >= 2 && ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0))) {
     print_version();
-    exit(EXIT_FAILURE);
+    exit(EXIT_SUCCESS);
   }
 
   /* Check if we are called with -h or --help parameter */
   if (argc >= 2 && ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0))) {
     usage(argv[0]);
-    exit(EXIT_FAILURE);
+    exit(EXIT_SUCCESS);
   }
 
 #ifdef CONFIG_LIBDAEMON