[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [PATCH 10/3] qemu: remove dead code
- From: Eric Blake <eblake redhat com>
- To: libvir-list redhat com
- Subject: [libvirt] [PATCH 10/3] qemu: remove dead code
- Date: Tue, 2 Aug 2011 14:20:07 -0600
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.
---
Oops - I forgot to label the subject for 9/3 properly.
src/qemu/qemu_migration.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 8bdbcaf..7aeea69 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:
--
1.7.4.4
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]