1
0
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:
Yu Watanabe 2022-04-17 08:00:20 +09:00
parent 55bfacc6c3
commit c399ed923d

View File

@ -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 */
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) {