summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-04 13:04:40 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-06 23:01:25 +0200
commit83b6c1a6b147d42a1077ad589f48ad5cd74ecea1 (patch)
treec03bcc9ffbe224fb2fc87c536e7dd5565cc6fd9d /src
parentman: xinclude the generic text to talk about libsystemd pkgconfig (diff)
downloadsystemd-83b6c1a6b147d42a1077ad589f48ad5cd74ecea1.tar.xz
systemd-83b6c1a6b147d42a1077ad589f48ad5cd74ecea1.zip
bus-util: avoid unneeded initalization to zero
Diffstat (limited to 'src')
-rw-r--r--src/shared/bus-util.c10
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);
}