mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03: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:
parent
54ad51e3e9
commit
24f6fc22c1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user