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

[libvirt] [libvirt-glib] Don't loop forever on blank nodes



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

---
 libvirt-gconfig/libvirt-gconfig-helpers.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-helpers.c b/libvirt-gconfig/libvirt-gconfig-helpers.c
index c406a49..fecf3eb 100644
--- a/libvirt-gconfig/libvirt-gconfig-helpers.c
+++ b/libvirt-gconfig/libvirt-gconfig-helpers.c
@@ -174,11 +174,12 @@ void gvir_config_xml_foreach_child(xmlNodePtr node,
         gboolean cont;
         xmlNodePtr next = it->next;
 
-        if (xmlIsBlankNode(it))
-            continue;
-        cont = iter_func(it, opaque);
-        if (!cont)
-            break;
+        if (!xmlIsBlankNode(it)) {
+            cont = iter_func(it, opaque);
+            if (!cont)
+                break;
+        }
+
         it = next;
     }
 }
-- 
1.7.7.5


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