chiark / gitweb /
inhibit: don't return error code on --help
authorLennart Poettering <lennart@poettering.net>
Wed, 6 Nov 2013 16:33:44 +0000 (17:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 6 Nov 2013 16:33:44 +0000 (17:33 +0100)
src/login/inhibit.c

index 3ab86ac..404881b 100644 (file)
@@ -27,7 +27,6 @@
 #include <fcntl.h>
 
 #include "sd-bus.h"
-
 #include "bus-util.h"
 #include "bus-error.h"
 #include "util.h"
@@ -228,8 +227,10 @@ int main(int argc, char *argv[]) {
         log_open();
 
         r = parse_argv(argc, argv);
-        if (r <= 0)
+        if (r < 0)
                 return EXIT_FAILURE;
+        if (r == 0)
+                return EXIT_SUCCESS;
 
         r = sd_bus_open_system(&bus);
         if (r < 0) {