} else { #ifdef REPLACE  xmlReplaceNode(res, anXmlNode); #else
} else {
updateConstraint(xmlNodePtr cib, cibConstraint *anXmlNode){    CRM_DEBUG2("Updating " XML_CIB_TAG_CONSTRAINT " (%s)...", ID(anXmlNode));    xmlNodePtr res = findConstraint(cib, ID(anXmlNode));    if (res == NULL) {		CRM_DEBUG2("Update: " XML_CIB_TAG_CONSTRAINT " (%s) did not exist, adding.", ID(anXmlNode));		addConstraint(cib, anXmlNode);    }    else    {#ifdef REPLACE		// make a copy first		xmlReplaceNode(res, anXmlNode);#else		copy_in_properties(anXmlNode, res);			CRM_DEBUG2("Update: Copying in children for " XML_CIB_TAG_CONSTRAINT " (%s).", ID(anXmlNode));		xmlNodePtr iter = anXmlNode->children;		while(iter != NULL)		{			if (strcmp(XML_CIB_TAG_NVPAIR, iter->name) == 0)			{				const char *action = xmlGetProp(iter, XML_CIB_ATTR_ACTION);				const char *id = ID(iter);				xmlNodePtr dest = find_entity(res, XML_CIB_TAG_NVPAIR, id, FALSE);						if (dest != NULL)				{					unlink_xml_node(dest);//		    xmlFreeNode(dest);				}						if (strcmp("add", action) == 0)				{					xmlNodePtr node_copy = xmlCopyNode(iter, 1);					xmlUnsetProp(node_copy, XML_CIB_ATTR_ACTION); // remove the action property					xmlAddChild(res, node_copy);				}			}		}#endif    }    FNRET(0);}