if (failed != NULL && failed->children != NULL) { xmlAddChild(fragment, failed); } FNRET(fragment);
if (failed != NULL && failed->children != NULL) { xmlAddChild(fragment, xmlCopyNode(failed, 1)); } FNRET(fragment);
createCibFragmentAnswer(const char *section,						xmlNodePtr data,						xmlNodePtr failed){    xmlNodePtr		fragment = create_xml_node(NULL, XML_CIB_TAG_FRAGMENT),		cib = NULL;	    set_xml_property_copy(fragment, XML_CIB_ATTR_SECTION, section);    if (data != NULL) {		if (data->name == NULL) {			cl_log(LOG_ERR, "Data being added had no name, discarding.");					} else if (strcmp(CRM_SYSTEM_CIB, data->name) == 0			&& strcmp("all", section) == 0) {			CRM_DEBUG("Added entire cib to cib request");			xmlAddChild(fragment, xmlCopyNode(data, 1));					} else if (strcmp(data->name, section) == 0) {			CRM_DEBUG2("Added section (%s) to cib request", data->name);			cib = create_xml_node(fragment, XML_TAG_CIB);			xmlAddChild(cib, xmlCopyNode(data, 1));					} else {			cl_log(LOG_INFO,				   "Mismatch between section (%s) "				   "and data supplied (%s)... ignoring.",				   section, data->name);		}    } else		cl_log(LOG_INFO, "No data to add to cib message");    if (failed != NULL && failed->children != NULL) {		xmlAddChild(fragment, failed);    }    FNRET(fragment);}