From 190c22189dc369258f03c3ca7f94badc82c18b21 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Mar 2019 19:16:03 +0100 Subject: [PATCH] bus-unit-util: use structure initialization --- src/shared/bus-unit-util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index 32dfd3e914d..1ed895bd374 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -1844,11 +1844,13 @@ int bus_wait_for_jobs_new(sd_bus *bus, BusWaitForJobs **ret) { assert(bus); assert(ret); - d = new0(BusWaitForJobs, 1); + d = new(BusWaitForJobs, 1); if (!d) return -ENOMEM; - d->bus = sd_bus_ref(bus); + *d = (BusWaitForJobs) { + .bus = sd_bus_ref(bus), + }; /* When we are a bus client we match by sender. Direct * connections OTOH have no initialized sender field, and -- 2.47.3