summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-10 20:46:09 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-10 20:46:09 +0100
commitdf3efc3c9008eec6f2d3dc8df997f06758911fc8 (patch)
tree5990e1458ce3687034929fac46fb768550153910 /src
parenta89a8031e010ade7d3bdbbe5fd227e26250fb11c (diff)
bus-proxyd: initialize ioctl structure only once
Diffstat (limited to 'src')
-rw-r--r--src/bus-proxyd/driver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bus-proxyd/driver.c b/src/bus-proxyd/driver.c
index b27583959c..e47c667141 100644
--- a/src/bus-proxyd/driver.c
+++ b/src/bus-proxyd/driver.c
@@ -327,7 +327,10 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
return synthetic_reply_return_strv(m, names);
} else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListQueuedOwners")) {
- struct kdbus_cmd_list cmd = {};
+ struct kdbus_cmd_list cmd = {
+ .flags = KDBUS_LIST_QUEUED,
+ .size = sizeof(cmd),
+ };
struct kdbus_info *name_list, *name;
_cleanup_strv_free_ char **owners = NULL;
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -349,8 +352,6 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
- cmd.flags = KDBUS_LIST_QUEUED;
- cmd.size = sizeof(cmd);
r = ioctl(a->input_fd, KDBUS_CMD_LIST, &cmd);
if (r < 0)
return synthetic_reply_method_errno(m, -errno, NULL);