From: Lennart Poettering Date: Tue, 27 Nov 2018 12:39:20 +0000 (+0100) Subject: install: use structured initializers X-Git-Tag: v240~195^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d23aeead14eda5a70d599dcc37bcd4b2ebea7579;p=thirdparty%2Fsystemd.git install: use structured initializers --- 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) {