core/job: add check for return of job_type_merge_and_collapse()

Using an assertion is fine, since calls to job_merge_into_installed()
are protected by a check for job_type_is_conflicting().

Uncovered by Coverity, fixes CID 996307.
This commit is contained in:
Filipe Brandenburger 2018-06-12 14:20:04 -07:00 committed by Lennart Poettering
parent a2680b6f27
commit 53a2383b8b
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ static void job_merge_into_installed(Job *j, Job *other) {
assert(j->unit == other->unit);
if (j->type != JOB_NOP)
job_type_merge_and_collapse(&j->type, other->type, j->unit);
assert_se(job_type_merge_and_collapse(&j->type, other->type, j->unit) == 0);
else
assert(other->type == JOB_NOP);