mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
sd-bus: do not return negative errno when unknown name is specified
When 'recursive' is false, then sd_bus_track_remove_name() does not return negative errno when unknown name is specified. Let's follow the same pattern for the case that 'recursive' is true.
This commit is contained in:
parent
6a7ca27740
commit
55bfacc6c3
@ -256,12 +256,9 @@ _public_ int sd_bus_track_remove_name(sd_bus_track *track, const char *name) {
|
||||
if (!track) /* Treat a NULL track object as an empty track object */
|
||||
return 0;
|
||||
|
||||
if (!track->recursive)
|
||||
return bus_track_remove_name_fully(track, name);
|
||||
|
||||
i = hashmap_get(track->names, name);
|
||||
if (!i)
|
||||
return -EUNATCH;
|
||||
return 0;
|
||||
|
||||
assert(i->n_ref >= 1);
|
||||
if (i->n_ref <= 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user