qemuMigrationDstFinishFresh: Avoid multi-line ternary operator in function call

Rewrite the code using a temporary variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2022-07-25 14:03:18 +02:00
parent 45912ac399
commit a74fceb7d5

View File

@ -6601,9 +6601,12 @@ 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 = VIR_DOMAIN_RUNNING_MIGRATED;
if (*inPostCopy)
runningReason = VIR_DOMAIN_RUNNING_POSTCOPY;
if (qemuProcessStartCPUs(driver, vm, runningReason,
VIR_ASYNC_JOB_MIGRATION_IN) < 0) {
if (virGetLastErrorCode() == VIR_ERR_OK)
virReportError(VIR_ERR_INTERNAL_ERROR,