if(rsc_lh == NULL || rsc_rh == NULL){
if(rsc_lh == NULL){ pe_config_err("No resource found for LHS %s", id); return FALSE;  } else if(rsc_rh == NULL){ pe_config_err("No resource found for RHS of %s", id);
rsc_colocation_new(const char *id, enum con_strength strength,		   resource_t *rsc_lh, resource_t *rsc_rh,		   const char *state_lh, const char *state_rh){	rsc_colocation_t *new_con      = NULL; 	rsc_colocation_t *inverted_con = NULL; 	if(rsc_lh == NULL || rsc_rh == NULL){		/* error */		return FALSE;	}	crm_malloc0(new_con, sizeof(rsc_colocation_t));	if(new_con == NULL) {		return FALSE;	}	if(safe_str_eq(state_lh, CRMD_ACTION_STARTED)) {		state_lh = NULL;	}	if(safe_str_eq(state_rh, CRMD_ACTION_STARTED)) {		state_rh = NULL;	}	new_con->id       = id;	new_con->rsc_lh   = rsc_lh;	new_con->rsc_rh   = rsc_rh;	new_con->strength = strength;	new_con->state_lh = state_lh;	new_con->state_rh = state_rh;	inverted_con = invert_constraint(new_con);		crm_debug_4("Adding constraint %s (%p) to %s",		  new_con->id, new_con, rsc_lh->id);		rsc_lh->rsc_cons = g_list_insert_sorted(		rsc_lh->rsc_cons, new_con, sort_cons_strength);		crm_debug_4("Adding constraint %s (%p) to %s",		  inverted_con->id, inverted_con, rsc_rh->id);		rsc_rh->rsc_cons = g_list_insert_sorted(		rsc_rh->rsc_cons, inverted_con, sort_cons_strength);		return TRUE;}