summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-05-21 18:29:44 +0200
committertege <tege@gmplib.org>2002-05-21 18:29:44 +0200
commit9ef9e2b4ec78a88f821da3fc1f875c3d9d87896c (patch)
tree82a9f194223356869888c1c022a365e078a0bdf8
parent199c76a93570bc5968ea7b641c9820aa58d8d1b2 (diff)
downloadgmp-9ef9e2b4ec78a88f821da3fc1f875c3d9d87896c.tar.gz
Nailify.
-rw-r--r--mpz/set_str.c2
-rw-r--r--randlc2x.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/mpz/set_str.c b/mpz/set_str.c
index 55d03ba23..4027527e0 100644
--- a/mpz/set_str.c
+++ b/mpz/set_str.c
@@ -131,7 +131,7 @@ mpz_set_str (mpz_ptr x, const char *str, int base)
str_size = s - begs;
xsize = (((mp_size_t) (str_size / __mp_bases[base].chars_per_bit_exactly))
- / BITS_PER_MP_LIMB + 2);
+ / GMP_NUMB_BITS + 2);
if (x->_mp_alloc < xsize)
_mpz_realloc (x, xsize);
diff --git a/randlc2x.c b/randlc2x.c
index d37e96c78..7e05b1f4d 100644
--- a/randlc2x.c
+++ b/randlc2x.c
@@ -31,8 +31,7 @@ gmp_randinit_lc_2exp (gmp_randstate_t rstate,
unsigned long int m2exp)
{
mpz_init_set_ui (rstate->_mp_seed, 1);
- _mpz_realloc (rstate->_mp_seed, m2exp / BITS_PER_MP_LIMB
- + (m2exp % BITS_PER_MP_LIMB != 0));
+ _mpz_realloc (rstate->_mp_seed, (m2exp + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS);
/* Allocate algorithm specific data. */
rstate->_mp_algdata._mp_lc = (__gmp_randata_lc *)