]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: remove dead code
authorEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 20:18:01 +0000 (14:18 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 21:10:50 +0000 (15:10 -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.

src/qemu/qemu_migration.c

index 8bdbcaf28581f1b173d93f34f1041afdbdb2cd46..7aeea69ec7e5dc155b21101aad0c8c8f21d3c912 100644 (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: