pdebug(cl_log(LOG_DEBUG, "Choose a color from %d possibilities", g_slist_length(sorted_colors))); 
pdebug(			      "Choose a color from %d possibilities", g_slist_length(sorted_colors)); } 
choose_color(resource_t *lh_resource, GSListPtr candidate_colors){	int lpc = 0;	GSListPtr sorted_colors = g_slist_sort(candidate_colors,					sort_color_weight);	lh_resource->candidate_colors = sorted_colors;		pdebug(cl_log(LOG_DEBUG,		      "Choose a color from %d possibilities",		      g_slist_length(sorted_colors)));		for(lpc = 0; lh_resource->provisional		    && lpc < g_slist_length(sorted_colors);	    lpc++) {		color_t *this_color = (color_t*)			g_slist_nth_data(sorted_colors, lpc);		GSListPtr intersection =			node_list_and(this_color->details->candidate_nodes, 				      lh_resource->allowed_nodes);		if(g_slist_length(intersection) != 0) {			// TODO: merge node weights			g_slist_free(this_color->details->candidate_nodes);			this_color->details->candidate_nodes = intersection;			lh_resource->color = this_color;			lh_resource->provisional = FALSE;		}	}	return !lh_resource->provisional;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/cffc6b784b06d9ab155a94575d008f3b56c858ee/pengine.c/clean/crm/pengine/pengine.c