From 451407c8c449e979466d3cf4540481a1e6e2ca7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 8 Mar 2018 17:34:34 +0100 Subject: [PATCH] qemu: simplify condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/qemu/qemu_migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index bf89e184ee..e5231555de 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -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)