summaryrefslogtreecommitdiff
path: root/gmp/mpz/fdiv_r_ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'gmp/mpz/fdiv_r_ui.c')
-rw-r--r--gmp/mpz/fdiv_r_ui.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/gmp/mpz/fdiv_r_ui.c b/gmp/mpz/fdiv_r_ui.c
index 98dd56c6f2..d16e432258 100644
--- a/gmp/mpz/fdiv_r_ui.c
+++ b/gmp/mpz/fdiv_r_ui.c
@@ -1,34 +1,23 @@
/* mpz_fdiv_r_ui -- Division rounding the quotient towards -infinity.
The remainder gets the same sign as the denominator.
-Copyright 1994-1996, 2001, 2002, 2004, 2005, 2012 Free Software Foundation,
+Copyright 1994, 1995, 1996, 2001, 2002, 2004, 2005 Free Software Foundation,
Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of either:
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at your
- option) any later version.
-
-or
-
- * the GNU General Public License as published by the Free Software
- Foundation; either version 2 of the License, or (at your option) any
- later version.
-
-or both in parallel, as here.
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+License for more details.
-You should have received copies of the GNU General Public License and the
-GNU Lesser General Public License along with the GNU MP Library. If not,
-see https://www.gnu.org/licenses/. */
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include "gmp.h"
#include "gmp-impl.h"
@@ -40,7 +29,7 @@ mpz_fdiv_r_ui (mpz_ptr rem, mpz_srcptr dividend, unsigned long int divisor)
mp_ptr np;
mp_limb_t rl;
- if (UNLIKELY (divisor == 0))
+ if (divisor == 0)
DIVIDE_BY_ZERO;
ns = SIZ(dividend);
@@ -60,7 +49,8 @@ mpz_fdiv_r_ui (mpz_ptr rem, mpz_srcptr dividend, unsigned long int divisor)
mp_size_t rn;
TMP_DECL;
- rp = MPZ_REALLOC (rem, 2);
+ MPZ_REALLOC (rem, 2);
+ rp = PTR(rem);
if (nn == 1) /* tdiv_qr requirements; tested above for 0 */
{