summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-05-14 16:13:52 +0200
committerKay Sievers <kay@vrfy.org>2013-05-14 16:13:52 +0200
commita3dc35472f3a48ea8445ad7a943e2ff253170417 (patch)
treea1ae9f8b5c579eaebf2487987b2d8e7bf29aa777 /src/libsystemd-bus/bus-kernel.c
parent7e853a9b9a858edbc24e6c85d134478cec840173 (diff)
bus: add and use UINT64_TO_PTR()
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd-bus/bus-kernel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index e329b14be8..071f2b9708 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -436,7 +436,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k, sd_bus_mess
if (d->vec.size < sizeof(struct bus_header))
return -EBADMSG;
- h = (struct bus_header*)(uintptr_t) d->vec.address;
+ h = (struct bus_header*)UINT64_TO_PTR(d->vec.address);
}
n_payload++;
@@ -486,9 +486,9 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k, sd_bus_mess
if (d->type == KDBUS_MSG_PAYLOAD_VEC) {
range_contains(idx, d->vec.size, ALIGN8(sizeof(struct bus_header)), BUS_MESSAGE_FIELDS_SIZE(m),
- (void *)(uintptr_t) d->vec.address, &m->fields);
+ UINT64_TO_PTR(d->vec.address), &m->fields);
range_contains(idx, d->vec.size, ALIGN8(sizeof(struct bus_header)) + ALIGN8(BUS_MESSAGE_FIELDS_SIZE(m)),
- BUS_MESSAGE_BODY_SIZE(m), (void *)(uintptr_t) d->vec.address, &m->body);
+ BUS_MESSAGE_BODY_SIZE(m), UINT64_TO_PTR(d->vec.address), &m->body);
idx += d->vec.size;