summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-27 13:39:20 +0100
committerLennart Poettering <lennart@poettering.net>2018-11-28 08:43:47 +0100
commitd23aeead14eda5a70d599dcc37bcd4b2ebea7579 (patch)
treeda7d53fc4149ccfe28bb12c583bdac86a00aefb5
parentsystemctl: separate out paragraphs in long message with empty line (diff)
downloadsystemd-d23aeead14eda5a70d599dcc37bcd4b2ebea7579.tar.xz
systemd-d23aeead14eda5a70d599dcc37bcd4b2ebea7579.zip
install: use structured initializers
-rw-r--r--src/shared/install.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 97c48afe5d..735e1f5b0e 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) {