From 9a87657a31890763ea859d6c1dbb8912ccb0ac56 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 2 Aug 2011 14:18:01 -0600 Subject: [PATCH] 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. --- src/qemu/qemu_migration.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 8bdbcaf285..7aeea69ec7 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -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: