switch(constraint->variant) { case same_node: inverted_con->variant = same_node; break; case start_before: inverted_con->variant = start_after; break; case start_after: inverted_con->variant = start_before; break; }
invert_constraint(rsc_to_rsc_t *constraint) {	rsc_to_rsc_t *inverted_con = NULL;	crm_verbose("Inverting constraint");	inverted_con = crm_malloc(sizeof(rsc_to_rsc_t));	inverted_con->id = crm_strdup(constraint->id);	inverted_con->strength = constraint->strength;	// swap the direction	inverted_con->rsc_lh = constraint->rsc_rh;	inverted_con->rsc_rh = constraint->rsc_lh;	crm_debug_action(		print_rsc_to_rsc("Inverted constraint", inverted_con, FALSE));		return inverted_con;}