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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]