qemu: domainjob: remove async variable from qemuDomainObjBeginJobInternal()

This patch removes variable 'async', which is used only once, and
replaces it with direct comparison with an enum member.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Kristina Hanicova 2022-07-19 14:47:28 +02:00 committed by Michal Privoznik
parent f52dbac93f
commit 34c9782d28

View File

@ -875,7 +875,6 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
unsigned long long now;
unsigned long long then;
bool nested = job == VIR_JOB_ASYNC_NESTED;
bool async = job == VIR_JOB_ASYNC;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
const char *blocker = NULL;
const char *agentBlocker = NULL;
@ -903,7 +902,8 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
then = now + QEMU_JOB_WAIT_TIME;
retry:
if ((!async && job != VIR_JOB_DESTROY) &&
if (job != VIR_JOB_ASYNC &&
job != VIR_JOB_DESTROY &&
cfg->maxQueuedJobs &&
priv->job.jobsQueued > cfg->maxQueuedJobs) {
goto error;