1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 01:55:32 +03:00

login: simplify assignment

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-07-05 12:02:20 -04:00
parent 604f02add6
commit de7de280b5

View File

@ -690,8 +690,8 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus
}
manager_get_session_by_pid(m, leader, &session);
if (!session && vtnr > 0)
session = (vtnr < m->seat0->position_count) ? m->seat0->positions[vtnr] : NULL;
if (!session && vtnr > 0 && vtnr < m->seat0->position_count)
session = m->seat0->positions[vtnr];
if (session) {
_cleanup_free_ char *path = NULL;
_cleanup_close_ int fifo_fd = -1;