install: use structured initializers

This commit is contained in:
Lennart Poettering 2018-11-27 13:39:20 +01:00
parent ac9bbabbc5
commit d23aeead14

View File

@ -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) {