[Gmp-commit] /var/hg/gmp: mpn/generic/invert.c: loop cleanup
mercurial at gmplib.org
mercurial at gmplib.org
Mon Apr 27 10:18:08 UTC 2015
details: /var/hg/gmp/rev/63d469ed81a0
changeset: 16598:63d469ed81a0
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Mon Apr 27 11:34:51 2015 +0200
description:
mpn/generic/invert.c: loop cleanup
diffstat:
mpn/generic/invert.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (17 lines):
diff -r 0c6b3f298b36 -r 63d469ed81a0 mpn/generic/invert.c
--- a/mpn/generic/invert.c Sun Apr 26 20:51:31 2015 +0200
+++ b/mpn/generic/invert.c Mon Apr 27 11:34:51 2015 +0200
@@ -57,10 +57,10 @@
xp = scratch; /* 2 * n limbs */
/* n > 1 here */
- i = n - 1;
+ i = n;
do
- xp[i] = GMP_NUMB_MAX;
- while (--i >= 0);
+ xp[--i] = GMP_NUMB_MAX;
+ while (i);
mpn_com (xp + n, dp, n);
if (n == 2) {
mpn_divrem_2 (ip, 0, xp, 4, dp);
More information about the gmp-commit
mailing list