From f72daa64dcfa73c8427663be53d49393e0cbb343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 15 Nov 2012 16:30:24 +0100 Subject: [PATCH] dbus-manager: modernize style --- src/core/dbus-manager.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 3cf3e90a365..262e5ffef47 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -740,7 +740,8 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, if (r < 0) return bus_send_error_reply(connection, message, &error, r); - if (!(reply = dbus_message_new_method_return(message))) + reply = dbus_message_new_method_return(message); + if (!reply) goto oom; } else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "GetJob")) { @@ -1358,7 +1359,8 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, if (!e) goto oom; - if (!(reply = dbus_message_new_method_return(message))) { + reply = dbus_message_new_method_return(message); + if (!reply) { strv_free(e); goto oom; } @@ -1410,7 +1412,8 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, if (!f) goto oom; - if (!(reply = dbus_message_new_method_return(message))) { + reply = dbus_message_new_method_return(message); + if (!reply) { strv_free(f); goto oom; }