Return success on version and help argument

It's not a failure to print version or usage, so use return code
success.
This commit is contained in:
Henrik Nilsson
2019-08-01 10:16:37 +02:00
parent 2e7e5b6856
commit 14de9e27ab
+2 -2
View 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