summaryrefslogtreecommitdiff
path: root/gmp-h.in
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-04-26 23:39:21 +0200
committertege <tege@gmplib.org>2002-04-26 23:39:21 +0200
commit48814e7ce705392e76009aac414c8da2ba4e0ecb (patch)
treef0e2b2f439d8fe45a77ac94fc79625e3f57e0c66 /gmp-h.in
parent86219864a29165c2e5f465ee4d8709a1ac999bdc (diff)
downloadgmp-48814e7ce705392e76009aac414c8da2ba4e0ecb.tar.gz
(mpz_get_ui): Fix typo from last change.
Diffstat (limited to 'gmp-h.in')
-rw-r--r--gmp-h.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/gmp-h.in b/gmp-h.in
index e49d86709..0f2400987 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -1549,13 +1549,13 @@ 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);
+ return __gmp_l & (-(mp_limb_t) (__gmp_n != 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 */
__gmp_n = __GMP_ABS (__gmp_n);
if (__gmp_n <= 1)
- return __gmp_l & (-(mp_limb_t) __gmp_n);
+ return __gmp_l & (-(mp_limb_t) (__gmp_n != 0));
else
return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS);
}