int lpc = 0, lpc2 = 0; resource_t *child_0  = NULL; resource_t *child_lh = NULL; resource_t *child_rh = NULL; 
GListPtr color_ptr = NULL; GListPtr child_colors = NULL; int local_node_max = 0; 
clone_color(resource_t *rsc, pe_working_set_t *data_set){	int lpc = 0, lpc2 = 0;	resource_t *child_0  = NULL;	resource_t *child_lh = NULL;	resource_t *child_rh = NULL;	clone_variant_data_t *clone_data = NULL;	get_clone_variant_data(clone_data, rsc);	if(clone_data->self->provisional == FALSE) {		return NULL;	}	child_0 = g_list_nth_data(clone_data->child_list, 0);	clone_data->max_nodes = rsc->fns->num_allowed_nodes(rsc);	/* generate up to max_nodes * clone_node_max constraints */	lpc = 0;	clone_data->active_clones = clone_data->max_nodes * clone_data->clone_max_node;	if(clone_data->active_clones > clone_data->clone_max) {		clone_data->active_clones = clone_data->clone_max;	}	crm_info("Distributing %d (of %d) %s clones over %d nodes",		 clone_data->active_clones, clone_data->clone_max,		 rsc->id, clone_data->max_nodes);	if(clone_data->self->is_managed) {			for(; lpc < clone_data->active_clones && lpc < clone_data->max_nodes; lpc++) {			child_lh = g_list_nth_data(clone_data->child_list, lpc);			for(lpc2 = lpc + 1; lpc2 < clone_data->active_clones; lpc2++) {				child_rh = g_list_nth_data(clone_data->child_list,lpc2);								if(lpc2 < clone_data->max_nodes) {					crm_debug_2("Clone %d will not run with %d",						    lpc, lpc2);					rsc_colocation_new(						"__clone_internal_must_not__",						pecs_must_not, child_lh, child_rh, NULL, NULL);									} else if((lpc2 % clone_data->max_nodes) == lpc) {					crm_debug_2("Clone %d can run with %d",						    lpc, lpc2);					rsc_colocation_new(						"__clone_internal_must__",						pecs_must, child_lh, child_rh, NULL, NULL);				}			}			for(; lpc2 < clone_data->clone_max; lpc2++) {				child_rh = g_list_nth_data(clone_data->child_list,lpc2);				crm_debug_2("Unrunnable: Clone %d will not run with %d",					    lpc2, lpc);				rsc_colocation_new("__clone_internal_must_not__",						   pecs_must_not, child_lh, child_rh, NULL, NULL);			}					}	}	slist_iter(		child_rsc, resource_t, clone_data->child_list, lpc,		color_t *child_color = NULL;		if(lpc >= clone_data->active_clones) {			crm_warn("Clone %s cannot be started", child_rsc->id);		}		child_color = child_rsc->fns->color(child_rsc, data_set);		CRM_DEV_ASSERT(child_color != NULL);		native_assign_color(rsc, child_color);		);	clone_data->self->provisional = FALSE;	return NULL;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/599526e9a1218642926dbe435ffc748c2bdea1e5/incarnation.c/clean/crm/pengine/incarnation.c