mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
sd-bus: use hashmap_contains() and drop unnecessary cast
This commit is contained in:
parent
55bfacc6c3
commit
c399ed923d
@ -287,7 +287,7 @@ _public_ const char* sd_bus_track_contains(sd_bus_track *track, const char *name
|
|||||||
if (!track) /* Let's consider a NULL object equivalent to an empty object */
|
if (!track) /* Let's consider a NULL object equivalent to an empty object */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return hashmap_get(track->names, (void*) name) ? name : NULL;
|
return hashmap_contains(track->names, name) ? name : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_public_ const char* sd_bus_track_first(sd_bus_track *track) {
|
_public_ const char* sd_bus_track_first(sd_bus_track *track) {
|
||||||
|
Loading…
Reference in New Issue
Block a user