[libvirt] [PATCH 3/3] qemu: migration: Make check for empty hook XML robust

Peter Krempa pkrempa at redhat.com
Wed Oct 22 09:48:06 UTC 2014


Also consider whitespace only strings returned from the hook as empty
result.
---
 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 e135249..ca70e35 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 {
-- 
2.1.0




More information about the libvir-list mailing list