resource_t *lh_resource = (resource_t*)g_slist_nth_data(sorted_rsc, lpc);
lh_resource = (resource_t*)g_slist_nth_data(sorted_rsc, lpc);
stage2(GSListPtr sorted_rsc,        GSListPtr sorted_nodes,        GSListPtr operations){	int lpc = 0; 	// Set initial color	// Set color.candidate_nodes = all active nodes	current_color = cl_malloc(sizeof(color_t));	cl_log(LOG_DEBUG, "setup");	current_color = create_color(node_list);  	// Set resource.color = color (all resources)	// Set resource.provisional = TRUE (all resources)	for(lpc = 0; lpc < g_slist_length(sorted_rsc); lpc++) {		resource_t *this_resource = (resource_t*)g_slist_nth_data(sorted_rsc, lpc);		this_resource->color = current_color;		this_resource->provisional = TRUE;	}	cl_log(LOG_DEBUG, "initialized resources to default color");  	// Take (next) highest resource	for(lpc = 0; lpc < g_slist_length(sorted_rsc); lpc++) {		cl_log(LOG_DEBUG, "Processing resource %d", lpc);		resource_t *lh_resource = (resource_t*)g_slist_nth_data(sorted_rsc, lpc);		// if resource.provisional == FALSE, repeat 		if(lh_resource->provisional == FALSE) {			// already processed this resource			continue;		}    		color_resource(lh_resource, sorted_rsc, colors);		// next resource	}	return TRUE;}