1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

job: fix coverity issue

Fixes coverity issue 1403550
This commit is contained in:
Lennart Poettering 2019-07-31 09:44:28 +02:00
parent 38c569bbb8
commit 735a8b6d38

View File

@ -1153,7 +1153,10 @@ void job_add_to_run_queue(Job *j) {
log_warning_errno(r, "Failed to enable job run queue event source, ignoring: %m");
}
prioq_put(j->manager->run_queue, j, &j->run_queue_idx);
r = prioq_put(j->manager->run_queue, j, &j->run_queue_idx);
if (r < 0)
log_warning_errno(r, "Failed put job in run queue, ignoring: %m");
else
j->in_run_queue = true;
}