elem_r = crm_element_value(right, XML_ATTR_NUMUPDATES);
if(right != NULL) { elem_r = crm_element_value(right, XML_ATTR_NUMUPDATES); }
cib_compare_generation(crm_data_t *left, crm_data_t *right){	int int_elem_l = -1;	int int_elem_r = -1;	const char *elem_l = crm_element_value(left, XML_ATTR_GENERATION);	const char *elem_r = crm_element_value(right, XML_ATTR_GENERATION);	if(elem_l != NULL) int_elem_l = atoi(elem_l);	if(elem_r != NULL) int_elem_r = atoi(elem_r);	crm_xml_trace(left, "left");	crm_xml_trace(left, "right");		if(int_elem_l < int_elem_r) {		crm_verbose("lt - XML_ATTR_GENERATION");		return -1;			} else if(int_elem_l > int_elem_r) {		crm_verbose("gt - XML_ATTR_GENERATION");		return 1;	}	int_elem_l = -1;	int_elem_r = -1;	elem_l = crm_element_value(left, XML_ATTR_NUMUPDATES);	elem_r = crm_element_value(right, XML_ATTR_NUMUPDATES);	if(elem_l != NULL) int_elem_l = atoi(elem_l);	if(elem_r != NULL) int_elem_r = atoi(elem_r);	crm_xml_trace(left, "left");	crm_xml_trace(left, "right");		if(int_elem_l < int_elem_r) {		crm_verbose("lt - XML_ATTR_NUMUPDATES");		return -1;			} else if(int_elem_l > int_elem_r) {		crm_verbose("gt - XML_ATTR_NUMUPDATES");		return 1;	}		crm_verbose("eq - XML_ATTR_NUMUPDATES");	int_elem_l = -1;	int_elem_r = -1;	elem_l = crm_element_value(left, XML_ATTR_NUMPEERS);	elem_r = crm_element_value(right, XML_ATTR_NUMPEERS);	if(elem_l != NULL) int_elem_l = atoi(elem_l);	if(elem_r != NULL) int_elem_r = atoi(elem_r);	crm_xml_trace(left, "left");	crm_xml_trace(left, "right");		if(int_elem_l < int_elem_r) {		crm_verbose("lt - XML_ATTR_NUMPEERS");		return -1;			} else if(int_elem_l > int_elem_r) {		crm_verbose("gt - XML_ATTR_NUMPEERS");		return 1;	}		crm_verbose("eq - XML_ATTR_NUMPEERS");	elem_l = crm_element_value(left, XML_ATTR_NUMPEERS);	elem_r = crm_element_value(right, XML_ATTR_NUMPEERS);	if(elem_l == NULL && elem_r == NULL) {	} else if(elem_l == NULL) {		crm_verbose("lt - XML_ATTR_NUMPEERS");		return -1;	} else if(elem_r == NULL) {		crm_verbose("gt - XML_ATTR_NUMPEERS");		return 1;	} else if(safe_str_neq(elem_l, elem_r)) {		if(safe_str_eq(elem_l, XML_BOOLEAN_TRUE)) {			crm_verbose("gt - XML_ATTR_NUMPEERS");			return 1;					} else if(safe_str_eq(elem_r, XML_BOOLEAN_TRUE)) {			crm_verbose("lt - XML_ATTR_NUMPEERS");			return -1;		}	}		crm_verbose("eq - XML_ATTR_NUMPEERS");	return 0;}