summaryrefslogtreecommitdiff
path: root/mpz/cfdiv_r_2exp.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-11-07 22:02:48 +0100
committerKevin Ryde <user42@zip.com.au>2001-11-07 22:02:48 +0100
commitd45a6762815bb2b5a86924a455f23e53d6353f15 (patch)
tree2977b065089b64b79a60ad78daf3299b0f71a2e5 /mpz/cfdiv_r_2exp.c
parenteb78ed6deae27e774accb6c6d1e02f22c7dc614d (diff)
downloadgmp-d45a6762815bb2b5a86924a455f23e53d6353f15.tar.gz
Add a comment related to:
Slight change to: * mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Reread `up' after realloc of w.
Diffstat (limited to 'mpz/cfdiv_r_2exp.c')
-rw-r--r--mpz/cfdiv_r_2exp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mpz/cfdiv_r_2exp.c b/mpz/cfdiv_r_2exp.c
index 094fe16fb..039198a97 100644
--- a/mpz/cfdiv_r_2exp.c
+++ b/mpz/cfdiv_r_2exp.c
@@ -50,6 +50,9 @@ cfdiv_r_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt, int dir)
limb_cnt = cnt / BITS_PER_MP_LIMB;
cnt %= BITS_PER_MP_LIMB;
abs_usize = ABS (usize);
+
+ /* MPZ_REALLOC(w) below is only when w!=u, so we can fetch PTR(u) here
+ nice and early */
up = PTR(u);
if ((usize ^ dir) < 0)