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/import.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/import.c')
-rw-r--r-- | mpz/import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/import.c b/mpz/import.c index 1585d67e1..a3f0cc993 100644 --- a/mpz/import.c +++ b/mpz/import.c @@ -46,8 +46,8 @@ mpz_import (mpz_ptr z, size_t count, int order, ASSERT (endian == 1 || endian == 0 || endian == -1); ASSERT (nail <= 8*size); - zsize = (count * (8*size - nail) + GMP_NUMB_BITS-1) / GMP_NUMB_BITS; - zp = MPZ_REALLOC (z, zsize); + zsize = BITS_TO_LIMBS (count * (8*size - nail)); + zp = MPZ_NEWALLOC (z, zsize); if (endian == 0) endian = HOST_ENDIAN; |