for(lpc = 0; lpc < g_slist_length(colors); lpc++) { color_t *color_n = (color_t*)g_slist_nth_data(colors, lpc);
slist_iter( color_n, color_t, colors, lpc,
choose_node_from_list(GSListPtr colors, color_t *color, GSListPtr nodes){	/*	  1. Sort by weight	  2. color.chosen_node = highest wieghted node 	  3. remove color.chosen_node from all other colors	*/	int lpc = 0;	nodes = g_slist_sort(nodes, sort_node_weight);	color->details->chosen_node = (node_t*)g_slist_nth_data(nodes, 0);	if(color->details->chosen_node == NULL) {		cl_log(LOG_ERR, "Could not allocate a node for color %d", color->id);		return FALSE;	}		for(lpc = 0; lpc < g_slist_length(colors); lpc++) {		color_t *color_n = (color_t*)g_slist_nth_data(colors, lpc);		node_t *other_node = pe_find_node(color_n->details->candidate_nodes,						    color->details->chosen_node->id);		color_n->details->candidate_nodes =			g_slist_remove(color_n->details->candidate_nodes,				       other_node);	}	return TRUE;}