]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: domainjob: remove async variable from qemuDomainObjBeginJobInternal()
authorKristina Hanicova <khanicov@redhat.com>
Tue, 19 Jul 2022 12:47:28 +0000 (14:47 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 20 Jul 2022 12:34:15 +0000 (14:34 +0200)
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>
src/qemu/qemu_domainjob.c

index 1f6d97655887ea8f2fb437c88e39a028e95582d9..7c6b6979591d4fa2ab170c807809ecb3119142bc 100644 (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;