From b25ba6cf673036e46cbaec77d3c7859ed83d3ca8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Aug 2018 20:20:50 +0200 Subject: [PATCH] logind: initialize Manager object with structure initialization too --- src/login/logind.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/login/logind.c b/src/login/logind.c index e90c8575dcd..e7f3a99b97f 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -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);