From 54ad51e3e92c92240205aab2f9479c041cdaaf8f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 27 Oct 2014 13:04:12 +0100 Subject: Revert "sd-bus: check return value of asprintf()" This reverts commit b1543c4c93855b61b40118e9f14a0423dac2e078. We check b->address anyway, no need to check the return value, especially given that the other #ifdef branch don't get the same treatment. --- src/libsystemd/sd-bus/sd-bus.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index c17b1a0a0e..c2931a7f7b 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -1163,11 +1163,7 @@ int bus_set_address_user(sd_bus *b) { #endif } else { #ifdef ENABLE_KDBUS - int r; - - r = asprintf(&b->address, KERNEL_USER_BUS_FMT, getuid()); - if (r < 0) - return -ENOMEM; + asprintf(&b->address, KERNEL_USER_BUS_FMT, getuid()); #else return -ECONNREFUSED; #endif -- cgit v1.2.3-54-g00ecf