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); assert(ret);
m = new0(Manager, 1); m = new(Manager, 1);
if (!m) if (!m)
return -ENOMEM; return -ENOMEM;
m->console_active_fd = -1; *m = (Manager) {
m->reserve_vt_fd = -1; .console_active_fd = -1,
.reserve_vt_fd = -1,
};
m->idle_action_not_before_usec = now(CLOCK_MONOTONIC); m->idle_action_not_before_usec = now(CLOCK_MONOTONIC);