Rewrite the code using a temporary variable.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_migration.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 20dc91f1ce..800f66349d 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -6601,9 +6601,14 @@ qemuMigrationDstFinishFresh(virQEMUDriver *driver,
*inPostCopy = true;
if (!(flags & VIR_MIGRATE_PAUSED)) {
- if (qemuProcessStartCPUs(driver, vm,
- *inPostCopy ? VIR_DOMAIN_RUNNING_POSTCOPY
- : VIR_DOMAIN_RUNNING_MIGRATED,
+ virDomainRunningReason runningReason;
+
+ if (inPostCopy)
+ runningReason = VIR_DOMAIN_RUNNING_POSTCOPY;
+ else
+ runningReason = VIR_DOMAIN_RUNNING_MIGRATED;
+
+ if (qemuProcessStartCPUs(driver, vm, runningReason,
VIR_ASYNC_JOB_MIGRATION_IN) < 0) {
if (virGetLastErrorCode() == VIR_ERR_OK)
virReportError(VIR_ERR_INTERNAL_ERROR,
--
2.36.1