diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-12-06 11:09:42 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-12-06 11:09:42 +0100 |
commit | 55728301938e20a62c15ec1edee91b489c5d7fe3 (patch) | |
tree | 19e54bd844df6bf9265d3d0260c21cf2b1ec5d60 | |
parent | 59bc8e8ad67150416f64ad9880020aa8c822bc53 (diff) | |
download | gmp-55728301938e20a62c15ec1edee91b489c5d7fe3.tar.gz |
mpz/{abs,neg}.c: Use NEWALLOC.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | mpz/abs.c | 2 | ||||
-rw-r--r-- | mpz/neg.c | 5 |
3 files changed, 7 insertions, 3 deletions
@@ -3,6 +3,9 @@ * tests/mpq/reuse.c: New test (adapted from mpf/reuse.c). * tests/mpq/Makefile.am (check_PROGRAMS): Add reuse. + * mpz/abs.c: Use NEWALLOC. + * mpz/neg.c: Likewise. + 2012-12-05 Niels Möller <nisse@lysator.liu.se> * mpn/generic/brootinv.c (mpn_brootinv): Make valgrind happier, at @@ -33,7 +33,7 @@ mpz_abs (mpz_ptr w, mpz_srcptr u) if (u != w) { - wp = MPZ_REALLOC (w, size); + wp = MPZ_NEWALLOC (w, size); up = PTR (u); @@ -25,7 +25,8 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ void mpz_neg (mpz_ptr w, mpz_srcptr u) { - mp_ptr wp, up; + mp_ptr wp; + mp_srcptr up; mp_size_t usize, size; usize = SIZ (u); @@ -34,7 +35,7 @@ mpz_neg (mpz_ptr w, mpz_srcptr u) { size = ABS (usize); - wp = MPZ_REALLOC (w, size); + wp = MPZ_NEWALLOC (w, size); up = PTR (u); |