From 745af09bf206bedf78b4c7be79dec42c1020d65b Mon Sep 17 00:00:00 2001 From: vlefevre Date: Fri, 9 Mar 2018 23:17:29 +0000 Subject: [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 --- tests/tget_str.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/tget_str.c') 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); } } -- cgit v1.2.1