summaryrefslogtreecommitdiff
path: root/mpf/sub.c
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2011-08-17 09:43:09 +0200
committerTorbjorn Granlund <tege@gmplib.org>2011-08-17 09:43:09 +0200
commit50b89913b0c16be4693ac5cf6c8ecedd174cca1d (patch)
treec1941f4b4a51f8cf4c90c12b94af014b9c0bf460 /mpf/sub.c
parent476504e484fc5a91efa1023fe61269abf79194ad (diff)
downloadgmp-50b89913b0c16be4693ac5cf6c8ecedd174cca1d.tar.gz
Fix typo in copy condition. Delay an allocation.
Diffstat (limited to 'mpf/sub.c')
-rw-r--r--mpf/sub.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mpf/sub.c b/mpf/sub.c
index 845bdbc25..575b41296 100644
--- a/mpf/sub.c
+++ b/mpf/sub.c
@@ -1,6 +1,6 @@
/* mpf_sub -- Subtract two floats.
-Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Copyright 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2011 Free
Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -273,19 +273,19 @@ general_case:
vsize = prec - ediff;
}
- /* Allocate temp space for the result. Allocate
- just vsize + ediff later??? */
- tp = TMP_ALLOC_LIMBS (prec);
-
if (ediff >= prec)
{
/* V completely cancelled. */
- if (tp != up)
+ if (rp != up)
MPN_COPY (rp, up, usize);
rsize = usize;
}
else
{
+ /* Allocate temp space for the result. Allocate
+ just vsize + ediff later??? */
+ tp = TMP_ALLOC_LIMBS (prec);
+
/* Locate the least significant non-zero limb in (the needed
parts of) U and V, to simplify the code below. */
for (;;)