diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2012-05-26 15:57:43 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2012-05-26 15:57:43 +0200 |
commit | eb3632bb2177f6ea7d2f41c9722458c10159c013 (patch) | |
tree | 624a47bf95ce22460938a693f797937f5d6003cb /mpz/cdiv_qr_ui.c | |
parent | 27ac5bf5c349d49c7103674b4a366afb6ad51cca (diff) | |
download | gmp-eb3632bb2177f6ea7d2f41c9722458c10159c013.tar.gz |
Use MPZ_REALLOC return value when possible.
Diffstat (limited to 'mpz/cdiv_qr_ui.c')
-rw-r--r-- | mpz/cdiv_qr_ui.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mpz/cdiv_qr_ui.c b/mpz/cdiv_qr_ui.c index 4eb5e3536..eeec6eddd 100644 --- a/mpz/cdiv_qr_ui.c +++ b/mpz/cdiv_qr_ui.c @@ -3,8 +3,8 @@ always fit into the return type, the negative of the true remainder is returned. -Copyright 1994, 1995, 1996, 1999, 2001, 2002, 2004 Free Software Foundation, -Inc. +Copyright 1994, 1995, 1996, 1999, 2001, 2002, 2004, 2012 Free Software +Foundation, Inc. This file is part of the GNU MP Library. @@ -43,8 +43,7 @@ mpz_cdiv_qr_ui (mpz_ptr quot, mpz_ptr rem, mpz_srcptr dividend, unsigned long in } nn = ABS(ns); - MPZ_REALLOC (quot, nn); - qp = PTR(quot); + qp = MPZ_REALLOC (quot, nn); np = PTR(dividend); #if BITS_PER_ULONG > GMP_NUMB_BITS /* avoid warnings about shift amount */ @@ -54,8 +53,7 @@ mpz_cdiv_qr_ui (mpz_ptr quot, mpz_ptr rem, mpz_srcptr dividend, unsigned long in mp_ptr rp; mp_size_t rn; - MPZ_REALLOC (rem, 2); - rp = PTR(rem); + rp = MPZ_REALLOC (rem, 2); if (nn == 1) /* tdiv_qr requirements; tested above for 0 */ { |