native_variant_data_t *native_data = NULL; get_native_variant_data(native_data, rsc);
native_choose_color(resource_t *rsc, color_t *no_color){	GListPtr sorted_colors = NULL;	native_variant_data_t *native_data = NULL;	get_native_variant_data(native_data, rsc);		if(rsc->runnable == FALSE) {		native_assign_color(rsc, no_color);	}	if(rsc->provisional == FALSE) {		return !rsc->provisional;	}		sorted_colors = g_list_sort(		rsc->candidate_colors, sort_color_weight);		rsc->candidate_colors = sorted_colors;		crm_debug("Choose a color from %d possibilities",		    g_list_length(sorted_colors));		slist_iter(		this_color, color_t, rsc->candidate_colors, lpc,		GListPtr intersection = NULL;		GListPtr minus = NULL;		int len = 0;		if(this_color == NULL) {			pe_err("color was NULL");			continue;					} else if(this_color->local_weight < 0) {			/* no valid color available */			crm_debug("no valid color available");			break;					} else if(rsc->effective_priority		   < this_color->details->highest_priority) {			minus = node_list_minus(				this_color->details->candidate_nodes, 				rsc->allowed_nodes, TRUE);			len = g_list_length(minus);			pe_free_shallow(minus);					} else {			intersection = node_list_and(				this_color->details->candidate_nodes, 				rsc->allowed_nodes, TRUE);			len = g_list_length(intersection);			pe_free_shallow(intersection);					}		if(len > 0) {			crm_debug("Assigning color to %s", rsc->id);			native_assign_color(rsc, this_color);			break;		}		);	return !rsc->provisional;}