diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 78c09f1abe..6a744aec05 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2062,15 +2062,14 @@ qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf, virDomainObjPtr vm, qemuDomainObjPrivatePtr priv) { - qemuDomainJob job; + qemuDomainJob job = priv->job.active; - job = priv->job.active; if (!qemuDomainTrackJob(job)) - priv->job.active = QEMU_JOB_NONE; + job = QEMU_JOB_NONE; - if (priv->job.active || priv->job.asyncJob) { + if (job || priv->job.asyncJob) { virBufferAsprintf(buf, "job.active), + qemuDomainJobTypeToString(job), qemuDomainAsyncJobTypeToString(priv->job.asyncJob)); if (priv->job.phase) { virBufferAsprintf(buf, " phase='%s'", @@ -2099,7 +2098,6 @@ qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf, virBufferAddLit(buf, "\n"); } } - priv->job.active = job; }