summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-10 03:33:46 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-10 15:06:44 +0900
commit6112c86139c6fefb1e669d337531b26b8fce0ae8 (patch)
treee2e2c91378e35b5e8cba40ef88285c51613e801f /src/core
parent735f0645db13d18f1ea37f046343ae0c3ec36987 (diff)
downloadsystemd-6112c86139c6fefb1e669d337531b26b8fce0ae8.tar.gz
core: replace hashmap_get() with hashmap_contains() where appropriate
Diffstat (limited to 'src/core')
-rw-r--r--src/core/transaction.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 625a873c32..c3d6ffccc1 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -380,7 +380,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
if (strv_push_pair(&array, k->unit->id, (char*) job_type_to_string(k->type)) < 0)
log_oom();
- if (!delete && hashmap_get(tr->jobs, k->unit) && !job_matters_to_anchor(k))
+ if (!delete && hashmap_contains(tr->jobs, k->unit) && !job_matters_to_anchor(k))
/* Ok, we can drop this one, so let's do so. */
delete = k;
@@ -629,7 +629,7 @@ static int transaction_apply(
if (j->unit->ignore_on_isolate)
continue;
- if (hashmap_get(tr->jobs, j->unit))
+ if (hashmap_contains(tr->jobs, j->unit))
continue;
/* Not invalidating recursively. Avoids triggering
@@ -1110,7 +1110,7 @@ static bool shall_stop_on_isolate(Transaction *tr, Unit *u) {
return false;
/* Is there already something listed for this? */
- if (hashmap_get(tr->jobs, u))
+ if (hashmap_contains(tr->jobs, u))
return false;
return true;
@@ -1170,7 +1170,7 @@ int transaction_add_triggering_jobs(Transaction *tr, Unit *u) {
continue;
/* Is there already something listed for this? */
- if (hashmap_get(tr->jobs, trigger))
+ if (hashmap_contains(tr->jobs, trigger))
continue;
r = transaction_add_job_and_dependencies(tr, JOB_STOP, trigger, tr->anchor_job, true, false, false, false, NULL);