diff options
author | Kevin Ryde <user42@zip.com.au> | 2004-03-19 23:49:15 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2004-03-19 23:49:15 +0100 |
commit | 2fd75cd37f528d0dfbda61b9820196d7839ad57f (patch) | |
tree | 2da64f5115fb9490a39257487bc0e223badf2e58 /gmp-h.in | |
parent | 00ff883efbaa58f4482bd63d0fa7b465c597fe11 (diff) | |
download | gmp-2fd75cd37f528d0dfbda61b9820196d7839ad57f.tar.gz |
* gmp-h.in (mpz_get_ui): Use ?: instead of mask style, gcc treats the
two identically but ?: is a bit clearer.
Diffstat (limited to 'gmp-h.in')
-rw-r--r-- | gmp-h.in | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1658,7 +1658,7 @@ mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW mp_size_t __gmp_n = __gmp_z->_mp_size; mp_limb_t __gmp_l = __gmp_p[0]; if (__GMP_ULONG_MAX <= GMP_NUMB_MASK) - return __gmp_l & (-(mp_limb_t) (__gmp_n != 0)); + return (__gmp_n != 0 ? __gmp_l : 0); #if GMP_NAIL_BITS != 0 /* redundant #if, shuts up compiler warnings */ else /* happens for nails, but not if LONG_LONG_LIMB */ { /* assume two limbs are enough to fill an ulong */ |