job->ret must be always set together with job->err. Let's assert this. Reproting no-error to the user, when job->err is unset and job->ret is somehow set would be a bug. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxxx> --- job-qmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/job-qmp.c b/job-qmp.c index 9643c5424d..3e2172c26a 100644 --- a/job-qmp.c +++ b/job-qmp.c @@ -163,6 +163,7 @@ static JobInfo *job_query_single_locked(Job *job, Error **errp) uint64_t progress_total; assert(!job_is_internal(job)); + assert(!job->err == !job->ret); progress_get_snapshot(&job->progress, &progress_current, &progress_total); -- 2.34.1 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx