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