]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: migration: Make check for empty hook XML robust
authorPeter Krempa <pkrempa@redhat.com>
Wed, 22 Oct 2014 09:27:36 +0000 (11:27 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 22 Oct 2014 15:51:31 +0000 (17:51 +0200)
Also consider whitespace only strings returned from the hook as empty
result.

src/qemu/qemu_migration.c

index e135249fe20dd0e142321efaa12a18def34ccf3e..ca70e35294ffdeb492b6fc23460cbb10c42e15e3 100644 (file)
@@ -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 {