mruby-bigint (mpz_neg): no need to check x != y

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-07-27 17:45:28 +09:00
parent 811637e99f
commit 234a2b10fb
+1 -2
View File
@@ -863,8 +863,7 @@ mpz_div_2exp(mrb_state *mrb, mpz_t *z, mpz_t *x, mrb_int e)
static void
mpz_neg(mrb_state *mrb, mpz_t *x, mpz_t *y)
{
if (x!=y)
mpz_set(mrb, x, y);
mpz_set(mrb, x, y);
x->sn = -(y->sn);
}