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:
parent
14df094a51
commit
b25ba6cf67
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user