summaryrefslogtreecommitdiffstats
path: root/src/shared/bus-wait-for-units.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-04-17 20:43:39 +0200
committerMike Yuan <me@yhndnzj.com>2024-04-19 04:08:37 +0200
commitac21fafbea0a2ee94adac856b53fe04252b683fc (patch)
tree5b1fdba04ae71e95a306ceecf02f2937559c5570 /src/shared/bus-wait-for-units.c
parentbus-wait-for-units: check for existing unit first, use hashmap_ensure_put (diff)
downloadsystemd-ac21fafbea0a2ee94adac856b53fe04252b683fc.tar.xz
systemd-ac21fafbea0a2ee94adac856b53fe04252b683fc.zip
bus-wait-for-units: drop 'current' field
This is not used anywhere.
Diffstat (limited to 'src/shared/bus-wait-for-units.c')
-rw-r--r--src/shared/bus-wait-for-units.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/shared/bus-wait-for-units.c b/src/shared/bus-wait-for-units.c
index 1cb1eb70a6..7d919d3cd5 100644
--- a/src/shared/bus-wait-for-units.c
+++ b/src/shared/bus-wait-for-units.c
@@ -32,8 +32,6 @@ typedef struct BusWaitForUnits {
Hashmap *items;
- WaitForItem *current;
-
BusWaitForUnitsState state;
bool has_failed:1;
} BusWaitForUnits;
@@ -61,9 +59,6 @@ static WaitForItem *wait_for_item_free(WaitForItem *item) {
}
assert_se(hashmap_remove_value(item->parent->items, item->bus_path, item));
-
- if (item->parent->current == item)
- item->parent->current = NULL;
}
sd_bus_slot_unref(item->slot_properties_changed);
@@ -79,8 +74,6 @@ static WaitForItem *wait_for_item_free(WaitForItem *item) {
DEFINE_TRIVIAL_CLEANUP_FUNC(WaitForItem*, wait_for_item_free);
static void call_unit_callback_and_wait(BusWaitForUnits *d, WaitForItem *item, bool good) {
- d->current = item;
-
if (item->unit_callback)
item->unit_callback(d, item->bus_path, good, item->userdata);