summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-25 07:45:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-05-15 15:29:58 +0200
commitde0671ee7fe465e108f62dcbbbe9366f81dd9e9a (patch)
tree3ee30af44852655c365104703359b47a6e6219b5 /src/libsystemd/sd-bus/bus-kernel.c
parent12ed81d9c88406234c20e9261ae8c8b992d8bc4d (diff)
Remove unnecessary casts in printfs
No functional change expected :)
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index af42b9f5e1..8bab6ad1be 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1305,7 +1305,7 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
make->size += ALIGN8(n->size);
n = KDBUS_ITEM_NEXT(n);
- sprintf(n->str, "%lu-%s", (unsigned long) getuid(), name);
+ sprintf(n->str, UID_FMT"-%s", getuid(), name);
n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
n->type = KDBUS_ITEM_MAKE_NAME;
make->size += ALIGN8(n->size);
@@ -1396,7 +1396,7 @@ int bus_kernel_create_starter(const char *bus, const char *name, bool activating
assert(name);
p = alloca(strlen("/dev/kdbus/") + DECIMAL_STR_MAX(uid_t) + 1 + strlen(bus) + strlen("/bus") + 1);
- sprintf(p, "/dev/kdbus/%lu-%s/bus", (unsigned long) getuid(), bus);
+ sprintf(p, "/dev/kdbus/"UID_FMT"-%s/bus", getuid(), bus);
fd = open(p, O_RDWR|O_NOCTTY|O_CLOEXEC);
if (fd < 0)
@@ -1511,7 +1511,7 @@ int bus_kernel_create_monitor(const char *bus) {
assert(bus);
p = alloca(strlen("/dev/kdbus/") + DECIMAL_STR_MAX(uid_t) + 1 + strlen(bus) + strlen("/bus") + 1);
- sprintf(p, "/dev/kdbus/%lu-%s/bus", (unsigned long) getuid(), bus);
+ sprintf(p, "/dev/kdbus/"UID_FMT"-%s/bus", getuid(), bus);
fd = open(p, O_RDWR|O_NOCTTY|O_CLOEXEC);
if (fd < 0)