new_con = (rsc_to_node_t*)crm_malloc(sizeof(rsc_to_node_t));  new_con->id           = id; new_con->rsc_lh       = rsc; new_con->node_list_rh = NULL; new_con->can          = can;  if(can) { new_con->weight = weight; } else { new_con->weight = -1;
crm_malloc(new_con, sizeof(rsc_to_node_t)); if(new_con != NULL) { new_con->id           = id; new_con->rsc_lh       = rsc; new_con->node_list_rh = NULL; new_con->can          = can;  if(can) { new_con->weight = weight; } else { new_con->weight = -1; }  if(node != NULL) { new_con->node_list_rh = g_list_append(NULL, node); }  *node_constraints = g_list_append(*node_constraints, new_con);
rsc2node_new(const char *id, resource_t *rsc,	     double weight, gboolean can, node_t *node,	     GListPtr *node_constraints){	rsc_to_node_t *new_con = NULL;	if(rsc == NULL || id == NULL) {		crm_err("Invalid constraint %s for rsc=%p)", id, rsc);		return NULL;	}	new_con = (rsc_to_node_t*)crm_malloc(sizeof(rsc_to_node_t));		new_con->id           = id;	new_con->rsc_lh       = rsc;	new_con->node_list_rh = NULL;	new_con->can          = can;	if(can) {		new_con->weight = weight;	} else {		new_con->weight = -1;	}		if(node != NULL) {		new_con->node_list_rh = g_list_append(NULL, node);	}		*node_constraints = g_list_append(*node_constraints, new_con);	return new_con;}