summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-05-12 21:06:27 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-05-14 14:29:53 +0200
commit66aa6f7fbb16f441b28196c46a8c3fd60ed39d1b (patch)
treee78a9d32f1c4251df4daec8cc83c9a15510b13ae /src/core
parent7c99edf85b8245ccf3446a85781f200f030779ad (diff)
job: only jobs on the runqueue can be run
Diffstat (limited to 'src/core')
-rw-r--r--src/core/job.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 301d83a9dc..90091c298f 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -470,11 +470,10 @@ int job_run_and_invalidate(Job *j) {
assert(j);
assert(j->installed);
assert(j->type < _JOB_TYPE_MAX_IN_TRANSACTION);
+ assert(j->in_run_queue);
- if (j->in_run_queue) {
- LIST_REMOVE(Job, run_queue, j->manager->run_queue, j);
- j->in_run_queue = false;
- }
+ LIST_REMOVE(Job, run_queue, j->manager->run_queue, j);
+ j->in_run_queue = false;
if (j->state != JOB_WAITING)
return 0;