1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-09 12:58:26 +03:00

bus-unit-util: use structure initialization

This commit is contained in:
Lennart Poettering 2019-03-06 19:16:03 +01:00
parent 1c070ea086
commit 190c22189d

View File

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