1 file changed, 8 insertions(+), 12 deletions(-)
include/crm/common/xml.h | 20 ++++++++------------
# HG changeset patch
# User Andrew Beekhof <[EMAIL PROTECTED]>
# Date 1226580079 -3600
# Branch stable-1.0
# Node ID 4eb247ac66b9ec9dfa74f78620616e26df95f1eb
# Parent 6ef01bc882327f8f29b0ac3f062cc180c8d404a6
High: Core: Repair the ability to have comments in the configuration
diff --git a/include/crm/common/xml.h b/include/crm/common/xml.h
--- a/include/crm/common/xml.h
+++ b/include/crm/common/xml.h
@@ -218,34 +218,32 @@ extern const char *get_schema_name(int v
# define xml_child_iter(parent, child, code) do { \
if(parent != NULL) { \
- xmlNode *child = NULL; \
+ xmlNode *child = NULL; \
xmlNode *__crm_xml_iter = parent->children; \
while(__crm_xml_iter != NULL) { \
child = __crm_xml_iter; \
__crm_xml_iter = __crm_xml_iter->next; \
- if(child) { \
+ if(child->type == XML_ELEMENT_NODE) { \
code; \
} \
} \
- } else { \
- crm_debug_4("Parent of loop was NULL"); \
} \
} while(0)
# define xml_child_iter_filter(parent, child, filter, code) do { \
if(parent != NULL) { \
xmlNode *child = NULL; \
- xmlNode *__crm_xml_iter = parent->children; \
+ xmlNode *__crm_xml_iter = parent->children; \
while(__crm_xml_iter != NULL) { \
child = __crm_xml_iter; \
__crm_xml_iter = __crm_xml_iter->next; \
- if(filter == NULL \
- || crm_str_eq(filter, (const char *)child->name, TRUE)) { \
- code; \
+ if(child->type == XML_ELEMENT_NODE) { \
+ if(filter == NULL \
+ || crm_str_eq(filter, (const char *)child->name, TRUE)) { \
+ code; \
+ } \
} \
} \
- } else { \
- crm_debug_4("Parent of loop was NULL"); \
} \
} while(0)
@@ -262,8 +260,6 @@ extern const char *get_schema_name(int v
code; \
} \
} \
- } else { \
- crm_debug_4("Parent of loop was NULL"); \
} \
} while(0)
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker