if (findHaNode(cib, ID(xml_node)) != NULL) FNRET(-2);
FNIN();  id = xmlGetProp(xml_node, XML_ATTR_ID); type = xmlGetProp(xml_node, XML_CIB_ATTR_NODETYPE);  if (id == NULL || strlen(id) < 1) add_res = -1; else if (findHaNode(cib, ID(xml_node)) != NULL) add_res = -2; else if (type == NULL || strlen(type) < 1) add_res = -3; else add_res = add_node_copy(cib, XML_CIB_TAG_NODES, xml_node);
addHaNode(xmlNodePtr cib, cibHaNode *xml_node){    const char * id = xmlGetProp(xml_node, XML_ATTR_ID);    if (id == NULL || strlen(id) < 1) FNRET(-1);    if (findHaNode(cib, ID(xml_node)) != NULL) FNRET(-2);    const char * type = xmlGetProp(xml_node, XML_CIB_ATTR_NODETYPE);    if (type == NULL || strlen(type) < 1) {		FNRET(-3);    }        FNRET(add_node_copy(cib, XML_CIB_TAG_NODES, xml_node));}