[Gmp-commit] /var/hg/gmp: ;-P

mercurial at gmplib.org mercurial at gmplib.org
Fri Apr 20 11:55:03 CEST 2012


details:   /var/hg/gmp/rev/24e651a4dd41
changeset: 14873:24e651a4dd41
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Apr 20 11:54:59 2012 +0200
description:
;-P

diffstat:

 mpz/clrbit.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r 89aa924cfba5 -r 24e651a4dd41 mpz/clrbit.c
--- a/mpz/clrbit.c	Fri Apr 20 11:43:37 2012 +0200
+++ b/mpz/clrbit.c	Fri Apr 20 11:54:59 2012 +0200
@@ -86,12 +86,12 @@
 	  dp[limb_idx] = ((((dp[limb_idx] - 1) | mask) + 1) & GMP_NUMB_MASK);
 	  if (dp[limb_idx] == 0)
 	    {
-	      /* Increment at dsize + 1.  Extend the number with a zero limb
+	      /* Increment at limb_idx + 1.  Extend the number with a zero limb
 		 for simplicity.  */
 	      dp = MPZ_REALLOC (d, dsize + 1);
 	      dp[dsize] = 0;
-	      mpn_incr_u (dp + limb_idx + 1, 1);
-	      dsize += dp[dsize] != 0;
+	      MPN_INCR_U (dp + limb_idx + 1, dsize - limb_idx, 1);
+	      dsize += dp[dsize];
 
 	      SIZ (d) = -dsize;
 	    fin:;


More information about the gmp-commit mailing list