node1->details->id, node1->weight, node2->details->id, node2->weight);
node1->details->id, node1_weight, node2->details->id, node2_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;	if(a == NULL) { return 1; }	if(b == NULL) { return -1; }		if(node1->weight > node2->weight) {		crm_devel("%s (%f) > %s (%f) : weight",			  node1->details->id, node1->weight,			  node2->details->id, node2->weight);		return -1;	}		if(node1->weight < node2->weight) {		crm_devel("%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_devel("%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_devel("%s (%d) > %s (%d) : resources",			  node1->details->id, node1->details->num_resources,			  node2->details->id, node2->details->num_resources);		return 1;	}		crm_devel("%s = %s", node1->details->id, node2->details->id);	return 0;}