From d875200bbfcc663133f29ce8cd4ab636853447d7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 26 Sep 2024 10:49:21 -0700 Subject: [PATCH] factor: factor_using_division returns uuint * src/factor.c (factor_using_division): Return uuint rather than half via pointer. All callers changed. --- src/factor.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/factor.c b/src/factor.c index 66b620061d..8efb1aea4f 100644 --- a/src/factor.c +++ b/src/factor.c @@ -728,8 +728,8 @@ factor_insert_refind (struct factors *factors, uintmax_t p, int i, int off) order, and the non-multiples of p onto the range lim < q < B. */ -static uintmax_t -factor_using_division (uintmax_t *t1p, uintmax_t t1, uintmax_t t0, +static uuint +factor_using_division (uintmax_t t1, uintmax_t t0, struct factors *factors) { if (t0 % 2 == 0) @@ -775,8 +775,6 @@ factor_using_division (uintmax_t *t1p, uintmax_t t1, uintmax_t t0, } p += primes_diff[i + 1]; } - if (t1p) - *t1p = t1; #define DIVBLOCK(I) \ do { \ @@ -808,7 +806,7 @@ factor_using_division (uintmax_t *t1p, uintmax_t t1, uintmax_t t0, break; } - return t0; + return make_uuint (t1, t0); } static void @@ -2195,7 +2193,7 @@ factor (uintmax_t t1, uintmax_t t0, struct factors *factors) if (t1 == 0 && t0 < 2) return; - t0 = factor_using_division (&t1, t1, t0, factors); + uuset (&t1, &t0, factor_using_division (t1, t0, factors)); if (t1 == 0 && t0 < 2) return; -- 2.47.2