[systemd-commits] src/libsystemd-bus

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sun Jan 5 08:17:26 PST 2014


 src/libsystemd-bus/sd-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2047a15a17d9773cc87569b4176af72830a086eb
Author: Michael Scherer <misc at zarb.org>
Date:   Sun Jan 5 17:06:50 2014 +0100

    Fix format string mismatch introduced in ab9001a1
    
    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());

diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index c2f77a9..7f3ecbf 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -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



More information about the systemd-commits mailing list