chiark / gitweb /
Fix format string mismatch introduced in ab9001a1
authorMichael Scherer <misc@zarb.org>
Sun, 5 Jan 2014 16:06:50 +0000 (17:06 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 5 Jan 2014 16:17:03 +0000 (11:17 -0500)
src/libsystemd-bus/sd-bus.c: In function 'sd_bus_open_user':
src/libsystemd-bus/sd-bus.c:1104:25: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'long unsigned int' [-Wformat=]
                         asprintf(&b->address, UNIX_USER_BUS_FMT, (unsigned long) getuid());

src/libsystemd-bus/sd-bus.c

index c2f77a9..7f3ecbf 100644 (file)
@@ -1101,7 +1101,7 @@ _public_ int sd_bus_open_user(sd_bus **ret) {
 #ifdef ENABLE_KDBUS
                         asprintf(&b->address, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT, (unsigned long) getuid(), ee);
 #else
-                        asprintf(&b->address, UNIX_USER_BUS_FMT, (unsigned long) getuid());
+                        asprintf(&b->address, UNIX_USER_BUS_FMT, ee);
 #endif
                 } else {
 #ifdef ENABLE_KDBUS