diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-08 19:14:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 08:20:20 +0200 |
commit | 3cc2aff1abff9e34f9fec282d970204dc1eab6f1 (patch) | |
tree | 39d4b5f8f9980aeacaf64b4c3078f51a46a3b63e /src/core/transaction.c | |
parent | 7f6e12b03300ba3e473ce6b85d823fc0375b335e (diff) |
tree-wide: don't do assignments within if checks
Turn this:
if ((r = foo()) < 0) { ...
into this:
r = foo();
if (r < 0) { ...
Diffstat (limited to 'src/core/transaction.c')
-rw-r--r-- | src/core/transaction.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c index 090103fbda..b505297e23 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -464,9 +464,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; } |