summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-04-22 21:00:49 +0200
committertege <tege@gmplib.org>2002-04-22 21:00:49 +0200
commitc63b77638847802bc5abeb3d9ad96244621083d9 (patch)
tree0c7e27538c1bb541d214c5191eaba00ae2e2da05
parenteb524811bd105dd0997d921ee37c4f88c580ad83 (diff)
downloadgmp-c63b77638847802bc5abeb3d9ad96244621083d9.tar.gz
Move assignments of up out of conditionals.
-rw-r--r--mpz/cmp_ui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/cmp_ui.c b/mpz/cmp_ui.c
index 38d732187..30a0722de 100644
--- a/mpz/cmp_ui.c
+++ b/mpz/cmp_ui.c
@@ -26,17 +26,18 @@ MA 02111-1307, USA. */
int
_mpz_cmp_ui (mpz_srcptr u, unsigned long int v_digit)
{
- mp_size_t un;
mp_ptr up;
+ mp_size_t un;
mp_limb_t ul;
+ up = PTR(u);
un = SIZ(u);
+
if (un == 0)
return -(v_digit != 0);
if (un == 1)
{
- up = PTR(u);
ul = up[0];
if (ul > v_digit)
return 1;
@@ -50,7 +51,6 @@ _mpz_cmp_ui (mpz_srcptr u, unsigned long int v_digit)
{
if (un == 2)
{
- up = PTR(u);
ul = up[0] + (up[1] << GMP_NUMB_BITS);
if (ul > v_digit)