sd-bus: explicitly cast asprintf() return value away we are not interested in

Let's give coverity a hint what's going on here.
This commit is contained in:
Lennart Poettering 2014-10-27 13:06:11 +01:00
parent 54ad51e3e9
commit 24f6fc22c1

View file

@ -1157,13 +1157,13 @@ int bus_set_address_user(sd_bus *b) {
return -ENOMEM; return -ENOMEM;
#ifdef ENABLE_KDBUS #ifdef ENABLE_KDBUS
asprintf(&b->address, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT, getuid(), ee); (void) asprintf(&b->address, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT, getuid(), ee);
#else #else
asprintf(&b->address, UNIX_USER_BUS_FMT, ee); (void) asprintf(&b->address, UNIX_USER_BUS_FMT, ee);
#endif #endif
} else { } else {
#ifdef ENABLE_KDBUS #ifdef ENABLE_KDBUS
asprintf(&b->address, KERNEL_USER_BUS_FMT, getuid()); (void) asprintf(&b->address, KERNEL_USER_BUS_FMT, getuid());
#else #else
return -ECONNREFUSED; return -ECONNREFUSED;
#endif #endif