diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-11-06 08:20:31 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-11-06 08:20:31 +0100 |
commit | a35a2ab9c3365f3c38381aa8ac9e33d7d03754c5 (patch) | |
tree | 3275b3f48711276bd8e7a2556a62de713311077e /mpz/xor.c | |
parent | beb3d4ce987989677726b8d662e7e227b60e5b44 (diff) | |
download | gmp-a35a2ab9c3365f3c38381aa8ac9e33d7d03754c5.tar.gz |
mpz/?or.c: Remove duplicated branches, hinted now
Diffstat (limited to 'mpz/xor.c')
-rw-r--r-- | mpz/xor.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -55,9 +55,9 @@ mpz_xor (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) { if (op1_size >= op2_size) { - if (ALLOC(res) < op1_size) + if (UNLIKELY (ALLOC(res) < op1_size)) { - res_ptr = MPZ_REALLOC (res, op1_size); + res_ptr = (mp_ptr) _mpz_realloc (res, op1_size); /* No overlapping possible: op1_ptr = PTR(op1); */ op2_ptr = PTR(op2); } @@ -71,9 +71,9 @@ mpz_xor (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) } else { - if (ALLOC(res) < op2_size) + if (UNLIKELY (ALLOC(res) < op2_size)) { - res_ptr = MPZ_REALLOC (res, op2_size); + res_ptr = (mp_ptr) _mpz_realloc (res, op2_size); op1_ptr = PTR(op1); /* No overlapping possible: op2_ptr = PTR(op2); */ } @@ -162,9 +162,9 @@ mpz_xor (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) op2_ptr = opx; res_alloc = MAX (op1_size, op2_size) + 1; - if (ALLOC(res) < res_alloc) + if (UNLIKELY (ALLOC(res) < res_alloc)) { - res_ptr = MPZ_REALLOC (res, res_alloc); + res_ptr = (mp_ptr) _mpz_realloc (res, res_alloc); op1_ptr = PTR(op1); /* op2_ptr points to temporary space. */ } |