diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2011-08-17 09:43:09 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2011-08-17 09:43:09 +0200 |
commit | 50b89913b0c16be4693ac5cf6c8ecedd174cca1d (patch) | |
tree | c1941f4b4a51f8cf4c90c12b94af014b9c0bf460 /mpf/sub.c | |
parent | 476504e484fc5a91efa1023fe61269abf79194ad (diff) | |
download | gmp-50b89913b0c16be4693ac5cf6c8ecedd174cca1d.tar.gz |
Fix typo in copy condition. Delay an allocation.
Diffstat (limited to 'mpf/sub.c')
-rw-r--r-- | mpf/sub.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 (;;) |