summaryrefslogtreecommitdiff
path: root/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-26 07:02:51 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-26 07:02:51 +0100
commit44d8db9e5aa86165c97289f6c78a7e42bac78362 (patch)
treedc17149a1d8286eea1fb40b101ca2706a5427dc0 /manager.c
parent75787bb7136e064ee623aaee00ec76a7f024c91a (diff)
various cleanups
Diffstat (limited to 'manager.c')
-rw-r--r--manager.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/manager.c b/manager.c
index 7d24494b2b..90e17b2497 100644
--- a/manager.c
+++ b/manager.c
@@ -134,7 +134,12 @@ static void transaction_find_jobs_that_matter_to_anchor(Manager *m, Job *j, unsi
* indirectly a dependency of the anchor job via paths that
* are fully marked as mattering. */
- for (l = j ? j->subject_list : m->transaction_anchor; l; l = l->subject_next) {
+ if (j)
+ l = j->subject_list;
+ else
+ l = m->transaction_anchor;
+
+ LIST_FOREACH(subject, l, l) {
/* This link does not matter */
if (!l->matters)
@@ -169,7 +174,7 @@ static void transaction_merge_and_delete_job(Manager *m, Job *j, Job *other, Job
/* Patch us in as new owner of the JobDependency objects */
last = NULL;
- for (l = other->subject_list; l; l = l->subject_next) {
+ LIST_FOREACH(subject, l, other->subject_list) {
assert(l->subject == other);
l->subject = j;
last = l;
@@ -185,7 +190,7 @@ static void transaction_merge_and_delete_job(Manager *m, Job *j, Job *other, Job
/* Patch us in as new owner of the JobDependency objects */
last = NULL;
- for (l = other->object_list; l; l = l->object_next) {
+ LIST_FOREACH(object, l, other->object_list) {
assert(l->object == other);
l->object = j;
last = l;