diff options
author | tege <tege@gmplib.org> | 2002-04-22 21:00:49 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-04-22 21:00:49 +0200 |
commit | c63b77638847802bc5abeb3d9ad96244621083d9 (patch) | |
tree | 0c7e27538c1bb541d214c5191eaba00ae2e2da05 /mpz/cmp_ui.c | |
parent | eb524811bd105dd0997d921ee37c4f88c580ad83 (diff) | |
download | gmp-c63b77638847802bc5abeb3d9ad96244621083d9.tar.gz |
Move assignments of up out of conditionals.
Diffstat (limited to 'mpz/cmp_ui.c')
-rw-r--r-- | mpz/cmp_ui.c | 6 |
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) |