diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-11-05 12:17:05 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-11-05 12:17:05 +0100 |
commit | edd67a0bb9ee14beda4a5506bde8be9b7b1c13dd (patch) | |
tree | d6291cb20133913ad80760e16843215b1ce28186 /mpz/and.c | |
parent | 90ab612ad88f35a4a0b2f57ceddf835b064f9b94 (diff) | |
download | gmp-edd67a0bb9ee14beda4a5506bde8be9b7b1c13dd.tar.gz |
mpz/and.c: Use MPZ_NEWALLOC.
Diffstat (limited to 'mpz/and.c')
-rw-r--r-- | mpz/and.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,7 +1,7 @@ /* mpz_and -- Logical and. -Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2005, 2012 Free -Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2005, 2012, +2015 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -62,7 +62,7 @@ mpz_and (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) /* Handle allocation, now then we know exactly how much space is needed for the result. */ - res_ptr = MPZ_REALLOC (res, res_size); + res_ptr = MPZ_NEWALLOC (res, res_size); /* Don't re-read op1_ptr and op2_ptr. Since res_size <= MIN(op1_size, op2_size), res is not changed when op1 is identical to res or op2 is identical to res. */ @@ -107,7 +107,7 @@ mpz_and (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) mpn_sub_1 (opy, op2_ptr, op2_size, (mp_limb_t) 1); op2_ptr = opy; - res_ptr = MPZ_REALLOC (res, 1 + op2_size); + res_ptr = MPZ_NEWALLOC (res, 1 + op2_size); /* Don't re-read OP1_PTR and OP2_PTR. They point to temporary space--never to the space PTR(res) used to point to before reallocation. */ @@ -206,7 +206,7 @@ mpz_and (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) /* Handle allocation, now then we know exactly how much space is needed for the result. */ - res_ptr = MPZ_REALLOC (res, res_size); + res_ptr = MPZ_NEWALLOC (res, res_size); /* Don't re-read OP1_PTR or OP2_PTR. Since res_size = op1_size, op1 is not changed if it is identical to res. OP2_PTR points to temporary space. */ @@ -227,7 +227,7 @@ mpz_and (mpz_ptr res, mpz_srcptr op1, mpz_srcptr op2) /* Handle allocation, now then we know exactly how much space is needed for the result. */ - res_ptr = MPZ_REALLOC (res, res_size); + res_ptr = MPZ_NEWALLOC (res, res_size); /* Don't re-read OP1_PTR. Since res_size <= op1_size, op1 is not changed if it is identical to res. Don't re-read OP2_PTR. It points to temporary space--never |