]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: simplify condition
authorJán Tomko <jtomko@redhat.com>
Thu, 8 Mar 2018 16:34:34 +0000 (17:34 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 8 Mar 2018 16:40:56 +0000 (17:40 +0100)
In qemuMigrationSrcRun, we already checked for non-NULL mig
and then dereferenced it. It's only possible for mig to be
NULL in the error section.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c

index bf89e184ee0e313c283e6a53003cb93b3bf57c69..e5231555defc0cf8a259ce6d8b90e7967e5581df 100644 (file)
@@ -3992,7 +3992,7 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
         goto error;
     }
 
-    if (mig && mig->nbd &&
+    if (mig->nbd &&
         qemuMigrationSrcCancelDriveMirror(driver, vm, true,
                                           QEMU_ASYNC_JOB_MIGRATION_OUT,
                                           dconn) < 0)