crm_debug_3("%s (%f) < %s (%f) : weight",
crm_debug_4("%s (%f) < %s (%f) : weight",
gint sort_node_weight(gconstpointer a, gconstpointer b){	const node_t *node1 = (const node_t*)a;	const node_t *node2 = (const node_t*)b;	float node1_weight = 0;	float node2_weight = 0;		if(a == NULL) { return 1; }	if(b == NULL) { return -1; }	node1_weight = node1->weight;	node2_weight = node2->weight;		if(node1->details->unclean || node1->details->shutdown) {		node1_weight  = -INFINITY; 	}	if(node2->details->unclean || node2->details->shutdown) {		node2_weight  = -INFINITY; 	}	if(node1_weight > node2_weight) {		crm_debug_3("%s (%f) > %s (%f) : weight",			  node1->details->id, node1_weight,			  node2->details->id, node2_weight);		return -1;	}		if(node1_weight < node2_weight) {		crm_debug_3("%s (%f) < %s (%f) : weight",			  node1->details->id, node1_weight,			  node2->details->id, node2_weight);		return 1;	}	/* now try to balance resources across the cluster */	if(node1->details->num_resources	   < node2->details->num_resources) {		crm_debug_3("%s (%d) < %s (%d) : resources",			  node1->details->id, node1->details->num_resources,			  node2->details->id, node2->details->num_resources);		return -1;			} else if(node1->details->num_resources		  > node2->details->num_resources) {		crm_debug_3("%s (%d) > %s (%d) : resources",			  node1->details->id, node1->details->num_resources,			  node2->details->id, node2->details->num_resources);		return 1;	}		crm_debug_3("%s = %s", node1->details->id, node2->details->id);	return 0;}