From d6a093d098054b6fe866441251ad9485c9e31584 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 20 Apr 2012 10:02:05 +0200 Subject: transaction: remove checks for installed Transactions cannot contain installed jobs anymore. Remove the now pointless checks. --- src/core/job.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core/job.c') diff --git a/src/core/job.c b/src/core/job.c index 3454ffd1db..436f4a1b35 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -83,14 +83,13 @@ void job_free(Job *j) { void job_uninstall(Job *j) { assert(j->installed); + assert(j->unit->job == j); /* Detach from next 'bigger' objects */ bus_job_send_removed_signal(j); - if (j->unit->job == j) { - j->unit->job = NULL; - unit_add_to_gc_queue(j->unit); - } + j->unit->job = NULL; + unit_add_to_gc_queue(j->unit); hashmap_remove(j->manager->jobs, UINT32_TO_PTR(j->id)); j->installed = false; -- cgit v1.2.3-54-g00ecf