Make systemd-inhibit --list work

The code in the print_inhibitors function had an unintended
unconditional early exit, causing it to never print any
inhibitors.
This commit is contained in:
Matthias Clasen 2012-09-07 22:56:35 -04:00 committed by Lennart Poettering
parent 54aa25e63c
commit 680258b112
1 changed files with 3 additions and 2 deletions

View 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;