summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-socket.c')
-rw-r--r--src/libsystemd-bus/bus-socket.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libsystemd-bus/bus-socket.c b/src/libsystemd-bus/bus-socket.c
index c68c7bca68..145f454d5d 100644
--- a/src/libsystemd-bus/bus-socket.c
+++ b/src/libsystemd-bus/bus-socket.c
@@ -986,16 +986,14 @@ int bus_socket_read_message(sd_bus *bus, sd_bus_message **m) {
int bus_socket_process_opening(sd_bus *b) {
int error = 0;
socklen_t slen = sizeof(error);
- struct pollfd p;
+ struct pollfd p = {
+ .fd = b->output_fd,
+ .events = POLLOUT,
+ };
int r;
- assert(b);
assert(b->state == BUS_OPENING);
- zero(p);
- p.fd = b->output_fd;
- p.events = POLLOUT;
-
r = poll(&p, 1, 0);
if (r < 0)
return -errno;