diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2013-02-12 15:40:31 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2013-02-12 15:40:31 +0100 |
commit | a48fddf29870af5f7d62efebafc26697a0e1b09e (patch) | |
tree | 8790fd5855f46eb3aa4235cf457ce0699fd8ce65 /mpz/inp_raw.c | |
parent | e7d68730074437aa411e602c3bae38628a780a0a (diff) | |
download | gmp-a48fddf29870af5f7d62efebafc26697a0e1b09e.tar.gz |
mpz/import.c, mpz/inp_raw.c: Use BITS_TO_LIMBS and MPZ_NEWALLOC.
Diffstat (limited to 'mpz/inp_raw.c')
-rw-r--r-- | mpz/inp_raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/inp_raw.c b/mpz/inp_raw.c index 0da0c61c0..dddce9682 100644 --- a/mpz/inp_raw.c +++ b/mpz/inp_raw.c @@ -82,11 +82,11 @@ mpz_inp_raw (mpz_ptr x, FILE *fp) abs_csize = ABS (csize); /* round up to a multiple of limbs */ - abs_xsize = (abs_csize*8 + GMP_NUMB_BITS-1) / GMP_NUMB_BITS; + abs_xsize = BITS_TO_LIMBS (abs_csize*8); if (abs_xsize != 0) { - xp = MPZ_REALLOC (x, abs_xsize); + xp = MPZ_NEWALLOC (x, abs_xsize); /* Get limb boundaries right in the read, for the benefit of the non-nails case. */ |