&& g_slist_length(colors) < max_valid_nodes) {
&& g_slist_length(*colors) < max_valid_nodes) {
color_resource(resource_t *lh_resource){	int lpc = 0;	pdebug_action(print_resource("Coloring", lh_resource, FALSE));		if(lh_resource->provisional == FALSE) {			// already processed this resource		return;	}		lh_resource->rsc_cons = g_slist_sort(lh_resource->rsc_cons,					     sort_cons_strength);	pdebug("=== Pre-processing");	//------ Pre-processing	slist_iter(		constraint, rsc_to_rsc_t, lh_resource->rsc_cons, lpc,		color_t *other_color = NULL;		color_t *local_color = NULL;		if(lh_resource->runnable == FALSE) {			break;		}		pdebug_action(print_rsc_to_rsc(				      "Processing constraint",				      constraint, FALSE));				if(constraint->rsc_rh == NULL) {			cl_log(LOG_ERR,			       "rsc_rh was NULL for %s",			       constraint->id);			continue;		}		other_color = constraint->rsc_rh->color;		local_color = find_color(lh_resource->candidate_colors,					 other_color);		strict_preproc(constraint, local_color, other_color);		);		// filter out nodes with a negative weight	filter_nodes(lh_resource);  	/* Choose a color from the candidates or,	 *  create a new one if no color is suitable 	 * (this may need modification pending further napkin drawings)	 */	choose_color(lh_resource, lh_resource->candidate_colors);	  	pdebug("* Colors %d, Nodes %d",		      g_slist_length(colors),		      max_valid_nodes);		if(lh_resource->provisional		&& g_slist_length(colors) < max_valid_nodes) {		// Create new color		pdebug("Create a new color");		current_color = create_color(lh_resource->allowed_nodes, FALSE);		lh_resource->color = current_color;		lh_resource->provisional = FALSE;	} else if(lh_resource->provisional) {		cl_log(LOG_ERR, "Could not color resource %s", lh_resource->id);		print_resource("ERROR: No color", lh_resource, FALSE);		lh_resource->color = no_color;		lh_resource->provisional = FALSE;			}	pdebug_action(print_resource("Post-processing", lh_resource, FALSE));	//------ Post-processing	color_t *local_color = lh_resource->color;	slist_iter(		constraint, rsc_to_rsc_t, lh_resource->rsc_cons, lpc,		color_t *other_color =			find_color(constraint->rsc_rh->candidate_colors,				   local_color);		strict_postproc(constraint, local_color, other_color);		);		pdebug_action(print_resource("Colored", lh_resource, FALSE));}