chiark / gitweb /
tree-wide: sort includes in *.h
[elogind.git] / src / login / logind-dbus.c
index b549552aebfcf15bca25952fc77fdef6a143deca..82ab09be1090b15f6581da6dc51a784be5670d4f 100644 (file)
@@ -1532,6 +1532,10 @@ static int execute_shutdown_or_sleep(
                         "ss", NULL, "replace-irreversibly");
 #else
         r = shutdown_or_sleep(m, action);
+
+        /* no more pending actions, whether this failed or not */
+        m->pending_action = HANDLE_IGNORE;
+        m->action_what    = 0;
 #endif // 0
         if (r < 0)
                 return r;
@@ -2036,7 +2040,7 @@ static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
 
         r = sd_bus_query_sender_creds(message, SD_BUS_CREDS_AUGMENT|SD_BUS_CREDS_TTY|SD_BUS_CREDS_UID, &creds);
         if (r >= 0) {
-                const char *tty;
+                const char *tty = NULL;
 
                 (void) sd_bus_creds_get_uid(creds, &m->scheduled_shutdown_uid);
                 (void) sd_bus_creds_get_tty(creds, &tty);