From: Filipe Brandenburger Date: Tue, 12 Jun 2018 21:20:04 +0000 (-0700) Subject: core/job: add check for return of job_type_merge_and_collapse() X-Git-Tag: v240~1049 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53a2383b8bd978cdd98debb69dea95bf0091116a;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/job.c b/src/core/job.c index 734756b6665..2f37ff5bacb 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -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);