diff options
Diffstat (limited to 'src/libsystemd/bus-kernel.c')
-rw-r--r-- | src/libsystemd/bus-kernel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/bus-kernel.c b/src/libsystemd/bus-kernel.c index d69d6f3bc4..d3eeb52425 100644 --- a/src/libsystemd/bus-kernel.c +++ b/src/libsystemd/bus-kernel.c @@ -947,8 +947,8 @@ fail: } int bus_kernel_read_message(sd_bus *bus) { + struct kdbus_cmd_recv recv = {}; struct kdbus_msg *k; - uint64_t off; int r; assert(bus); @@ -957,14 +957,14 @@ int bus_kernel_read_message(sd_bus *bus) { if (r < 0) return r; - r = ioctl(bus->input_fd, KDBUS_CMD_MSG_RECV, &off); + r = ioctl(bus->input_fd, KDBUS_CMD_MSG_RECV, &recv); if (r < 0) { if (errno == EAGAIN) return 0; return -errno; } - k = (struct kdbus_msg *)((uint8_t *)bus->kdbus_buffer + off); + k = (struct kdbus_msg *)((uint8_t *)bus->kdbus_buffer + recv.offset); if (k->payload_type == KDBUS_PAYLOAD_DBUS) { r = bus_kernel_make_message(bus, k); |