summaryrefslogtreecommitdiff
path: root/src/core/transaction.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-09 09:57:29 +0200
committerDaniel Mack <github@zonque.org>2015-09-09 09:57:29 +0200
commit0fa7d1f5be847d4804eb3bf6a4c10333ea14e0bc (patch)
tree6afb70cc560bd94219f81495ff699c83b404e18c /src/core/transaction.c
parentbed2c013b6570908a114a337632000cf9c9de838 (diff)
parentece174c5439021e32ebcc858842de9586072c006 (diff)
Merge pull request #1207 from poettering/coccinelle-fixes
Coccinelle fixes
Diffstat (limited to 'src/core/transaction.c')
-rw-r--r--src/core/transaction.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 090103fbda..b8f69ec6f3 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -380,12 +380,10 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
"Found dependency on %s/%s",
k->unit->id, job_type_to_string(k->type));
- if (!delete && hashmap_get(tr->jobs, k->unit) &&
- !unit_matters_to_anchor(k->unit, k)) {
+ if (!delete && hashmap_get(tr->jobs, k->unit) && !unit_matters_to_anchor(k->unit, k))
/* Ok, we can drop this one, so let's
* do so. */
delete = k;
- }
/* Check if this in fact was the beginning of
* the cycle */
@@ -464,9 +462,11 @@ static int transaction_verify_order(Transaction *tr, unsigned *generation, sd_bu
g = (*generation)++;
- HASHMAP_FOREACH(j, tr->jobs, i)
- if ((r = transaction_verify_order_one(tr, j, NULL, g, e)) < 0)
+ HASHMAP_FOREACH(j, tr->jobs, i) {
+ r = transaction_verify_order_one(tr, j, NULL, g, e);
+ if (r < 0)
return r;
+ }
return 0;
}