float score_f   = 0.0;
int score_f   = 0;
generate_location_rule(	resource_t *rsc, crm_data_t *rule_xml, pe_working_set_t *data_set){	const char *rule_id = NULL;	const char *score   = NULL;	const char *boolean = NULL;	GListPtr match_L  = NULL;		float score_f   = 0.0;	gboolean do_and = TRUE;	gboolean accept = TRUE;		rsc_to_node_t *location_rule = NULL;		rule_id = crm_element_value(rule_xml, XML_ATTR_ID);	score   = crm_element_value(rule_xml, XML_RULE_ATTR_SCORE);	boolean = crm_element_value(rule_xml, XML_RULE_ATTR_BOOLEAN_OP);	crm_debug("processing rule: %s", rule_id);		score_f = char2score(score);		if(safe_str_eq(boolean, "or")) {		do_and = FALSE;	}		location_rule = rsc2node_new(rule_id, rsc, score_f, NULL, data_set);		if(location_rule == NULL) {		return NULL;	}	if(do_and) {		match_L = node_list_dup(data_set->nodes, FALSE);	}	xml_child_iter(		rule_xml, expr, XML_TAG_EXPRESSION,						slist_iter(			node, node_t, data_set->nodes, lpc,			accept = test_expression(expr, node, data_set);			if(!do_and && accept) {				if(pe_find_node(match_L, node->details->uname) == NULL) {					node_t *dup = node_copy(node);					match_L = g_list_append(match_L, dup);					crm_debug_5("node %s matched",						    node->details->uname);				}				crm_debug_5("node %s already matched",					    node->details->uname);							} else if(do_and && !accept) {				/* remove it */				node_t *delete = pe_find_node(					match_L, node->details->uname);				if(delete != NULL) {					match_L = g_list_remove(match_L,delete);					crm_debug_5("node %s did not match",						    node->details->uname);				}				crm_free(delete);			}			);		);		location_rule->node_list_rh = match_L;	if(location_rule->node_list_rh == NULL) {		crm_debug_2("No matching nodes for rule %s", rule_id);		return NULL;	} 	crm_debug_2("%s: %d nodes matched",		    rule_id, g_list_length(location_rule->node_list_rh));	crm_action_debug_3(print_rsc_to_node("Added", location_rule, FALSE));	return location_rule;}