chiark / gitweb /
Make systemd-inhibit --list work
authorMatthias Clasen <mclasen@redhat.com>
Sat, 8 Sep 2012 02:56:35 +0000 (22:56 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Sep 2012 07:32:50 +0000 (09:32 +0200)
The code in the print_inhibitors function had an unintended
unconditional early exit, causing it to never print any
inhibitors.

src/login/inhibit.c

index 029c954..62a8223 100644 (file)
@@ -86,9 +86,10 @@ static int print_inhibitors(DBusConnection *bus, DBusError *error) {
                         &reply,
                         NULL,
                         DBUS_TYPE_INVALID);
-        if (r)
-                return -ENOMEM;
+        if (r) {
+                r = -ENOMEM;
                 goto finish;
+        }
 
         if (!dbus_message_iter_init(reply, &iter)) {
                 r = -ENOMEM;