* 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)
/* 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;
/* 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;