diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/bus-util.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index e150c8728e..941a06f68d 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -1838,13 +1838,15 @@ static int request_name_handler_may_reload_dbus(sd_bus_message *m, void *userdat int bus_request_name_async_may_reload_dbus(sd_bus *bus, sd_bus_slot **ret_slot, const char *name, uint64_t flags, void *userdata) { struct request_name_data *data; - data = new0(struct request_name_data, 1); + data = new(struct request_name_data, 1); if (!data) return -ENOMEM; - data->name = name; - data->flags = flags; - data->userdata = userdata; + *data = (struct request_name_data) { + .name = name, + .flags = flags, + .userdata = userdata, + }; return sd_bus_request_name_async(bus, ret_slot, name, flags, request_name_handler_may_reload_dbus, data); } |