[Gmp-commit] /var/hg/gmp: Make return value consistent.

mercurial at gmplib.org mercurial at gmplib.org
Mon Feb 6 22:20:43 UTC 2017


details:   /var/hg/gmp/rev/ac1ddf728e5b
changeset: 17226:ac1ddf728e5b
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Mon Feb 06 23:20:36 2017 +0100
description:
Make return value consistent.

diffstat:

 mpn/generic/bdiv_q_1.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 551809881860 -r ac1ddf728e5b mpn/generic/bdiv_q_1.c
--- a/mpn/generic/bdiv_q_1.c	Mon Feb 06 19:45:13 2017 +0100
+++ b/mpn/generic/bdiv_q_1.c	Mon Feb 06 23:20:36 2017 +0100
@@ -5,7 +5,7 @@
    CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
    FUTURE GNU MP RELEASES.
 
-Copyright 2000-2003, 2005, 2009 Free Software Foundation, Inc.
+Copyright 2000-2003, 2005, 2009, 2017 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -73,9 +73,10 @@
 	}
 
       u = u >> shift;
-      l = u - c;
+      SUBC_LIMB (c, l, u, c);
+
       l = (l * di) & GMP_NUMB_MASK;
-      rp[i] = l;
+      rp[n] = l;
     }
   else
     {


More information about the gmp-commit mailing list