summaryrefslogtreecommitdiff
path: root/gmp-h.in
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2004-03-19 23:49:15 +0100
committerKevin Ryde <user42@zip.com.au>2004-03-19 23:49:15 +0100
commit2fd75cd37f528d0dfbda61b9820196d7839ad57f (patch)
tree2da64f5115fb9490a39257487bc0e223badf2e58 /gmp-h.in
parent00ff883efbaa58f4482bd63d0fa7b465c597fe11 (diff)
downloadgmp-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.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmp-h.in b/gmp-h.in
index d4a491da3..907d11732 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -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 */