mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-04 20:51:33 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user