]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-wait-for-units: use hashmap_remove_value where appropriate
authorMike Yuan <me@yhndnzj.com>
Mon, 1 Jan 2024 09:15:23 +0000 (17:15 +0800)
committerMike Yuan <me@yhndnzj.com>
Mon, 1 Jan 2024 10:42:23 +0000 (18:42 +0800)
src/shared/bus-wait-for-units.c

index 0dd2a295dd9b122d17af8757d3d89a2cd9a17c72..c32b0a1e14af93614687a0f34cddf78fb2ef740e 100644 (file)
@@ -63,7 +63,7 @@ static WaitForItem *wait_for_item_free(WaitForItem *item) {
                                 log_debug_errno(r, "Failed to drop reference to unit %s, ignoring: %m", item->bus_path);
                 }
 
-                assert_se(hashmap_remove(item->parent->items, item->bus_path) == item);
+                assert_se(hashmap_remove_value(item->parent->items, item->bus_path, item));
 
                 if (item->parent->current == item)
                         item->parent->current = NULL;