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
1 changed files with 3 additions and 3 deletions

View File

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