mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
logind: drop redundant session_id_valid() check
session_new() checks that as first step anyway, no need to do this beforehand.
This commit is contained in:
parent
20fff3de75
commit
b71282efea
@ -474,12 +474,6 @@ static int manager_enumerate_sessions(Manager *m) {
|
||||
if (!dirent_is_file(de))
|
||||
continue;
|
||||
|
||||
if (!session_id_valid(de->d_name)) {
|
||||
log_warning("Invalid session file name '%s', ignoring.", de->d_name);
|
||||
r = -EINVAL;
|
||||
continue;
|
||||
}
|
||||
|
||||
k = manager_add_session(m, de->d_name, &s);
|
||||
if (k < 0) {
|
||||
r = log_warning_errno(k, "Failed to add session by file name %s, ignoring: %m", de->d_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user