summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-05-22 00:02:06 +0200
committertege <tege@gmplib.org>2002-05-22 00:02:06 +0200
commitb0df9b42bd8e559772d03f02bee46c69317c3e9a (patch)
treeaea08c0c482f5c8dc5a44b9054de79ee1600ceb1
parentefcc2ff805694b9143ea29b71096df6ac9ff309b (diff)
downloadgmp-b0df9b42bd8e559772d03f02bee46c69317c3e9a.tar.gz
*** empty log message ***
-rw-r--r--mpz/gcd_ui.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mpz/gcd_ui.c b/mpz/gcd_ui.c
index 616e6d3f5..a0e2e7fa0 100644
--- a/mpz/gcd_ui.c
+++ b/mpz/gcd_ui.c
@@ -28,7 +28,6 @@ mpz_gcd_ui (mpz_ptr w, mpz_srcptr u, unsigned long int v)
{
mp_size_t un;
mp_limb_t res;
- mp_ptr up;
#if GMP_NAIL_BITS != 0
if (v > GMP_NUMB_MAX)
@@ -45,7 +44,6 @@ mpz_gcd_ui (mpz_ptr w, mpz_srcptr u, unsigned long int v)
#endif
un = ABSIZ(u);
- up = PTR(u);
if (un == 0)
res = v;
@@ -54,14 +52,14 @@ mpz_gcd_ui (mpz_ptr w, mpz_srcptr u, unsigned long int v)
if (w != NULL && u != w)
{
MPZ_REALLOC (w, un);
- MPN_COPY (PTR(w), up, un);
+ MPN_COPY (PTR(w), PTR(u), un);
SIZ(w) = un;
}
/* We can't return any useful result for gcd(big,0). */
- return un > 1 ? 0 : up[0];
+ return un > 1 ? 0 : PTR(u)[0];
}
else
- res = mpn_gcd_1 (up, un, (mp_limb_t) v);
+ res = mpn_gcd_1 (PTR(u), un, (mp_limb_t) v);
if (w != NULL)
{