chiark / gitweb /
logind-dbus: initialize result variable
[elogind.git] / src / login / logind-dbus.c
index 228a8389ee06b410400872e518e992e23577a58a..05cc1fdd13d0195275ce49da476494ed6421578f 100644 (file)
@@ -922,7 +922,7 @@ finish:
 
 static int attach_device(Manager *m, const char *seat, const char *sysfs) {
         struct udev_device *d;
-        char _cleanup_free_ *rule = NULL, *file = NULL;
+        _cleanup_free_ char *rule = NULL, *file = NULL;
         const char *id_for_seat;
         int r;
 
@@ -971,7 +971,7 @@ finish:
 }
 
 static int flush_devices(Manager *m) {
-        DIR _cleanup_closedir_ *d;
+        _cleanup_closedir_ DIR *d;
 
         assert(m);
 
@@ -1137,7 +1137,7 @@ static int bus_manager_can_shutdown_or_sleep(
                 DBusMessage **_reply) {
 
         bool multiple_sessions, challenge, blocked, b;
-        const char *result;
+        const char *result = NULL;
         _cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
         int r;
         unsigned long ul;
@@ -2457,7 +2457,7 @@ int manager_dispatch_delayed(Manager *manager) {
         dbus_error_init(&error);
         r = execute_shutdown_or_sleep(manager, manager->action_what, manager->action_unit, &error);
         if (r < 0) {
-                log_warning("Failed to send delayed message: %s", bus_error_message_or_strerror(&error, -r));
+                log_warning("Failed to send delayed message: %s", bus_error(&error, r));
                 dbus_error_free(&error);
 
                 manager->action_unit = NULL;