diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-03-09 23:17:29 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-03-09 23:17:29 +0000 |
commit | 745af09bf206bedf78b4c7be79dec42c1020d65b (patch) | |
tree | a5606aacdcc5417119aaa1a8827546c6229fb96b /tests/tget_str.c | |
parent | 959d69ed7099e265e701dbf26fcbd5c513285bde (diff) | |
download | mpfr-745af09bf206bedf78b4c7be79dec42c1020d65b.tar.gz |
[tests/tget_str.c] Use tests_allocate / tests_free.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12476 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_str.c')
-rw-r--r-- | tests/tget_str.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/tget_str.c b/tests/tget_str.c index 121e415eb..3c3ce0eb0 100644 --- a/tests/tget_str.c +++ b/tests/tget_str.c @@ -1386,7 +1386,7 @@ check_corner (void) mpfr_exp_t e; /* external exponent */ mpfr_prec_t oprec; /* external precision */ mpfr_prec_t iprec; /* internal precision */ -#define MAX_OPREC 100 +#define MAX_OPREC 100 char *s, *t; int i, ret; mpfr_exp_t f; @@ -1397,11 +1397,11 @@ check_corner (void) { mpfr_t x, y; oprec = mpfr_get_str_ndigits (b, iprec); - s = malloc (oprec + 6); /* oprec characters for the significand, - 1 for the '@' sign, - at most 4 for the exponent (-100), - and 1 for the terminating '\0'. */ - t = malloc (oprec + 6); + s = tests_allocate (oprec + 6); /* oprec characters for the + significand, 1 for the '@' sign, + at most 4 for the exponent (-100), + and 1 for the terminating '\0'. */ + t = tests_allocate (oprec + 6); mpfr_init2 (x, iprec); mpfr_init2 (y, iprec); /* set s to 1000...000Ee */ @@ -1432,8 +1432,8 @@ check_corner (void) } mpfr_clear (x); mpfr_clear (y); - free (s); - free (t); + tests_free (s, oprec + 6); + tests_free (t, oprec + 6); } } |