richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
594167
From 73c3e230dd66bedc82fa6dbf020c8d24592a32be Mon Sep 17 00:00:00 2001
594167
From: Yu Watanabe <watanabe.yu+github@gmail.com>
594167
Date: Sun, 17 Apr 2022 08:00:20 +0900
594167
Subject: [PATCH] sd-bus: use hashmap_contains() and drop unnecessary cast
594167
594167
(cherry picked from commit c399ed923d6fa4bf731455d485cac5f00e060806)
594167
594167
Related: #2087652
594167
---
594167
 src/libsystemd/sd-bus/bus-track.c | 2 +-
594167
 1 file changed, 1 insertion(+), 1 deletion(-)
594167
594167
diff --git a/src/libsystemd/sd-bus/bus-track.c b/src/libsystemd/sd-bus/bus-track.c
594167
index c56bd03fc6..4c44162108 100644
594167
--- a/src/libsystemd/sd-bus/bus-track.c
594167
+++ b/src/libsystemd/sd-bus/bus-track.c
594167
@@ -287,7 +287,7 @@ _public_ const char* sd_bus_track_contains(sd_bus_track *track, const char *name
594167
         if (!track) /* Let's consider a NULL object equivalent to an empty object */
594167
                 return NULL;
594167
 
594167
-        return hashmap_get(track->names, (void*) name) ? name : NULL;
594167
+        return hashmap_contains(track->names, name) ? name : NULL;
594167
 }
594167
 
594167
 _public_ const char* sd_bus_track_first(sd_bus_track *track) {