summaryrefslogtreecommitdiff
path: root/mpf
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-07-23 23:07:13 +0200
committerKevin Ryde <user42@zip.com.au>2001-07-23 23:07:13 +0200
commite1a291136b4928a8765c39719e212e84df402b56 (patch)
tree34d76cded848f69777be4224f57469badf0d0242 /mpf
parente7491ad8ca29764e033b3030ed09e4d30de39bc0 (diff)
downloadgmp-e1a291136b4928a8765c39719e212e84df402b56.tar.gz
* gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.
* mpz/get_str.c, mpq/get_str.c, mpf/get_str.c: Use it.
Diffstat (limited to 'mpf')
-rw-r--r--mpf/get_str.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mpf/get_str.c b/mpf/get_str.c
index 004fcfbad..211aab6a4 100644
--- a/mpf/get_str.c
+++ b/mpf/get_str.c
@@ -427,9 +427,7 @@ mpf_get_str (char *digit_ptr, mp_exp_t *exp, int base, size_t n_digits, mpf_srcp
if (alloc_size != 0)
{
size_t actual_size = strlen (digit_ptr) + 1;
- if (actual_size != alloc_size)
- digit_ptr = (*__gmp_reallocate_func) (digit_ptr,
- alloc_size, actual_size);
+ __GMP_REALLOCATE_FUNC_MAYBE (digit_ptr, alloc_size, actual_size);
}
return digit_ptr;