1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

logind: initialize Manager object with structure initialization too

This commit is contained in:
Lennart Poettering 2018-08-03 20:20:50 +02:00
parent 14df094a51
commit b25ba6cf67

View File

@ -35,12 +35,14 @@ static int manager_new(Manager **ret) {
assert(ret);
m = new0(Manager, 1);
m = new(Manager, 1);
if (!m)
return -ENOMEM;
m->console_active_fd = -1;
m->reserve_vt_fd = -1;
*m = (Manager) {
.console_active_fd = -1,
.reserve_vt_fd = -1,
};
m->idle_action_not_before_usec = now(CLOCK_MONOTONIC);