mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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:
parent
45912ac399
commit
a74fceb7d5
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user