mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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:
parent
f52dbac93f
commit
34c9782d28
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user