diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index c9ea8c61d7..5e770c83b7 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -3798,7 +3798,6 @@ _public_ int sd_event_loop(sd_event *e) { } _public_ int sd_event_get_fd(sd_event *e) { - assert_return(e, -EINVAL); assert_return(e = event_resolve(e), -ENOPKG); assert_return(!event_pid_changed(e), -ECHILD); diff --git a/src/login/logind-session.c b/src/login/logind-session.c index cbb5549bd8..d1527380ec 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -1089,8 +1089,8 @@ int session_create_fifo(Session *s) { if (r < 0) return r; - /* Let's make sure we noticed dead sessions before we process new bus requests (which might create new - * sessions). */ + /* Let's make sure we noticed dead sessions before we process new bus requests (which might + * create new sessions). */ r = sd_event_source_set_priority(s->fifo_event_source, SD_EVENT_PRIORITY_NORMAL-10); if (r < 0) return r; @@ -1331,9 +1331,8 @@ static void session_release_controller(Session *s, bool notify) { name = s->controller; - /* By resetting the controller before releasing the devices, we won't - * send notification signals. This avoids sending useless notifications - * if the controller is released on disconnects. */ + /* By resetting the controller before releasing the devices, we won't send notification signals. + * This avoids sending useless notifications if the controller is released on disconnects. */ if (!notify) s->controller = NULL; @@ -1419,43 +1418,43 @@ void session_drop_controller(Session *s) { static const char* const session_state_table[_SESSION_STATE_MAX] = { [SESSION_OPENING] = "opening", - [SESSION_ONLINE] = "online", - [SESSION_ACTIVE] = "active", - [SESSION_CLOSING] = "closing" + [SESSION_ONLINE] = "online", + [SESSION_ACTIVE] = "active", + [SESSION_CLOSING] = "closing", }; DEFINE_STRING_TABLE_LOOKUP(session_state, SessionState); static const char* const session_type_table[_SESSION_TYPE_MAX] = { [SESSION_UNSPECIFIED] = "unspecified", - [SESSION_TTY] = "tty", - [SESSION_X11] = "x11", - [SESSION_WAYLAND] = "wayland", - [SESSION_MIR] = "mir", - [SESSION_WEB] = "web", + [SESSION_TTY] = "tty", + [SESSION_X11] = "x11", + [SESSION_WAYLAND] = "wayland", + [SESSION_MIR] = "mir", + [SESSION_WEB] = "web", }; DEFINE_STRING_TABLE_LOOKUP(session_type, SessionType); static const char* const session_class_table[_SESSION_CLASS_MAX] = { - [SESSION_USER] = "user", - [SESSION_GREETER] = "greeter", + [SESSION_USER] = "user", + [SESSION_GREETER] = "greeter", [SESSION_LOCK_SCREEN] = "lock-screen", - [SESSION_BACKGROUND] = "background" + [SESSION_BACKGROUND] = "background", }; DEFINE_STRING_TABLE_LOOKUP(session_class, SessionClass); static const char* const kill_who_table[_KILL_WHO_MAX] = { [KILL_LEADER] = "leader", - [KILL_ALL] = "all" + [KILL_ALL] = "all", }; DEFINE_STRING_TABLE_LOOKUP(kill_who, KillWho); static const char* const tty_validity_table[_TTY_VALIDITY_MAX] = { - [TTY_FROM_PAM] = "from-pam", - [TTY_FROM_UTMP] = "from-utmp", + [TTY_FROM_PAM] = "from-pam", + [TTY_FROM_UTMP] = "from-utmp", [TTY_UTMP_INCONSISTENT] = "utmp-inconsistent", }; diff --git a/src/login/logind.c b/src/login/logind.c index be018a404d..82163343d3 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -922,14 +922,13 @@ static void manager_gc(Manager *m, bool drop_not_started) { LIST_REMOVE(gc_queue, m->session_gc_queue, session); session->in_gc_queue = false; - /* First, if we are not closing yet, initiate stopping */ + /* First, if we are not closing yet, initiate stopping. */ if (session_may_gc(session, drop_not_started) && session_get_state(session) != SESSION_CLOSING) (void) session_stop(session, /* force = */ false); - /* Normally, this should make the session referenced - * again, if it doesn't then let's get rid of it - * immediately */ + /* Normally, this should make the session referenced again, if it doesn't then let's get rid + * of it immediately. */ if (session_may_gc(session, drop_not_started)) { (void) session_finalize(session); session_free(session); @@ -1177,9 +1176,9 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; - /* Always create the directories people can create inotify watches in. Note that some applications might check - * for the existence of /run/systemd/seats/ to determine whether logind is available, so please always make - * sure these directories are created early on and unconditionally. */ + /* Always create the directories people can create inotify watches in. Note that some applications + * might check for the existence of /run/systemd/seats/ to determine whether logind is available, so + * please always make sure these directories are created early on and unconditionally. */ (void) mkdir_label("/run/systemd/seats", 0755); (void) mkdir_label("/run/systemd/users", 0755); (void) mkdir_label("/run/systemd/sessions", 0755);