提交 9a87657a 编写于 作者: E Eric Blake

qemu: remove dead code

Warning detected by Coverity.  No need for the NULL check, and
removing it silences the warning without any semantic change.

* src/qemu/qemu_migration.c (qemuMigrationFinish): All entries to
endjob had non-NULL vm.
上级 57ec8ced
......@@ -2569,13 +2569,11 @@ qemuMigrationFinish(struct qemud_driver *driver,
VIR_WARN("Unable to encode migration cookie");
endjob:
if (vm) {
if (qemuMigrationJobFinish(driver, vm) == 0) {
vm = NULL;
} else if (!vm->persistent && !virDomainObjIsActive(vm)) {
virDomainRemoveInactive(&driver->domains, vm);
vm = NULL;
}
if (qemuMigrationJobFinish(driver, vm) == 0) {
vm = NULL;
} else if (!vm->persistent && !virDomainObjIsActive(vm)) {
virDomainRemoveInactive(&driver->domains, vm);
vm = NULL;
}
cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册