mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
core/transaction: inline one iterator var
This commit is contained in:
@@ -369,8 +369,8 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
|
||||
|
||||
/* Have we seen this before? */
|
||||
if (j->generation == generation) {
|
||||
Job *k, *delete = NULL;
|
||||
_cleanup_free_ char **array = NULL, *unit_ids = NULL;
|
||||
Job *delete = NULL;
|
||||
|
||||
/* If the marker is NULL we have been here already and decided the job was loop-free from
|
||||
* here. Hence shortcut things and return right-away. */
|
||||
@@ -380,7 +380,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
|
||||
/* So, the marker is not NULL and we already have been here. We have a cycle. Let's try to
|
||||
* break it. We go backwards in our path and try to find a suitable job to remove. We use the
|
||||
* marker to find our way back, since smart how we are we stored our way back in there. */
|
||||
for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) {
|
||||
for (Job *k = from; k; k = (k->generation == generation && k->marker != k) ? k->marker : NULL) {
|
||||
|
||||
/* For logging below */
|
||||
if (strv_push_pair(&array, k->unit->id, (char*) job_type_to_string(k->type)) < 0)
|
||||
|
||||
Reference in New Issue
Block a user