MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / can_prune_leaf

Function can_prune_leaf

lib/common/xml.c:1359–1382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1357}
1358
1359gboolean
1360can_prune_leaf(xmlNode *xml_node)
1361{
1362 xmlNode *child = NULL;
1363 xmlAttrPtr pIter = NULL;
1364 gboolean can_prune = TRUE;
1365
1366 for(pIter = crm_first_attr(xml_node); pIter != NULL; pIter = pIter->next) {
1367 const char *p_name = (const char *)pIter->name;
1368 if(strcmp(p_name, XML_ATTR_ID) == 0) {
1369 continue;
1370 }
1371 can_prune = FALSE;
1372 }
1373
1374 for(child = __xml_first_child(xml_node); child != NULL; child = __xml_next(child)) {
1375 if(can_prune_leaf(child)) {
1376 free_xml(child);
1377 } else {
1378 can_prune = FALSE;
1379 }
1380 }
1381 return can_prune;
1382}
1383
1384
1385void

Callers 2

diff_xml_object_origFunction · 0.85
diff_xml_objectFunction · 0.85

Calls 4

crm_first_attrFunction · 0.85
__xml_first_childFunction · 0.85
__xml_nextFunction · 0.85
free_xmlFunction · 0.85

Tested by

no test coverage detected