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.
This commit is contained in:
Eric Blake 2011-08-02 14:18:01 -06:00
parent 57ec8cedfc
commit 9a87657a31

View File

@ -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: