color_t *new_color = crm_malloc(sizeof(color_t)); 
color_t *new_color = NULL;  if(g_list_length(*colors) >= max_valid_nodes) { return NULL; }  new_color = crm_malloc(sizeof(color_t)); 
create_color(GListPtr *colors, GListPtr nodes, GListPtr resources){	color_t *new_color = crm_malloc(sizeof(color_t));	new_color->id = color_id++;	new_color->local_weight = 1.0;	new_color->details = crm_malloc(sizeof(struct color_shared_s));	new_color->details->id = new_color->id; 	new_color->details->chosen_node = NULL; 	new_color->details->candidate_nodes = node_list_dup(nodes);	crm_debug_action(print_color("Created color", new_color, TRUE));	if(colors != NULL) {		*colors = g_list_append(*colors, new_color);      	}		if(resources != NULL) {		/* Add any new color to the list of candidate_colors for		 * resources that havent been decided yet 		 */		int lpc;		slist_iter(			rsc, resource_t, resources, lpc,			if(rsc->provisional && rsc->runnable) {				color_t *color_copy = (color_t *)					cl_malloc(sizeof(color_t));				color_copy->id      = new_color->id;				color_copy->details = new_color->details;				color_copy->local_weight = 1.0; 				rsc->candidate_colors =					g_list_append(rsc->candidate_colors,						       color_copy);			}			);	}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/d4d9a327fa109d440d0046cf18254a1a1533b70f/utils.c/clean/crm/pengine/utils.c