From d23aeead14eda5a70d599dcc37bcd4b2ebea7579 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Nov 2018 13:39:20 +0100 Subject: [PATCH] install: use structured initializers --- src/shared/install.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/shared/install.c b/src/shared/install.c index 97c48afe5d8..735e1f5b0e0 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1048,11 +1048,14 @@ static int install_info_add( if (r < 0) return r; - i = new0(UnitFileInstallInfo, 1); + i = new(UnitFileInstallInfo, 1); if (!i) return -ENOMEM; - i->type = _UNIT_FILE_TYPE_INVALID; - i->auxiliary = auxiliary; + + *i = (UnitFileInstallInfo) { + .type = _UNIT_FILE_TYPE_INVALID, + .auxiliary = auxiliary, + }; i->name = strdup(name); if (!i->name) {