From: Peter Krempa Date: Wed, 22 Oct 2014 09:27:36 +0000 (+0200) Subject: qemu: migration: Make check for empty hook XML robust X-Git-Tag: v1.2.9.1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a70d93e2266ee5ca829cb387ac1fcd2096ac3e63;p=thirdparty%2Flibvirt.git qemu: migration: Make check for empty hook XML robust Also consider whitespace only strings returned from the hook as empty result. (cherry picked from commit 19b1ee42b49b2764f7df23787f4b6022886a612c) --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 284cd5adbf..2a96661a01 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2570,7 +2570,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver, if (hookret < 0) { goto cleanup; } else if (hookret == 0) { - if (!*xmlout) { + if (virStringIsEmpty(xmlout)) { VIR_DEBUG("Migrate hook filter returned nothing; using the" " original XML"); } else {