chiark / gitweb /
transaction: remove the anchor link
[elogind.git] / src / core / job.c
index bfb6b7443a8673a52b25b9c4006ffdc6536548a9..aa7cdbff2add4c3522c38641380d6dc95ea69521 100644 (file)
@@ -96,7 +96,7 @@ void job_free(Job *j) {
         free(j);
 }
 
-JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts, Transaction *tr) {
+JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts) {
         JobDependency *l;
 
         assert(object);
@@ -116,21 +116,17 @@ JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool
 
         if (subject)
                 LIST_PREPEND(JobDependency, subject, subject->subject_list, l);
-        else
-                LIST_PREPEND(JobDependency, subject, tr->anchor, l);
 
         LIST_PREPEND(JobDependency, object, object->object_list, l);
 
         return l;
 }
 
-void job_dependency_free(JobDependency *l, Transaction *tr) {
+void job_dependency_free(JobDependency *l) {
         assert(l);
 
         if (l->subject)
                 LIST_REMOVE(JobDependency, subject, l->subject->subject_list, l);
-        else
-                LIST_REMOVE(JobDependency, subject, tr->anchor, l);
 
         LIST_REMOVE(JobDependency, object, l->object->object_list, l);
 
@@ -155,18 +151,6 @@ void job_dump(Job *j, FILE*f, const char *prefix) {
                 prefix, yes_no(j->override));
 }
 
-bool job_is_anchor(Job *j) {
-        JobDependency *l;
-
-        assert(j);
-
-        LIST_FOREACH(object, l, j->object_list)
-                if (!l->subject)
-                        return true;
-
-        return false;
-}
-
 /*
  * Merging is commutative, so imagine the matrix as symmetric. We store only
  * its lower triangle to avoid duplication. We don't store the main diagonal,