From: Paul Eggert Date: Wed, 4 Jun 2025 15:07:23 +0000 (-0700) Subject: factor: primes_diff idx type consistency X-Git-Tag: v9.8~223 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=845f3a6158be04d9cfa30db14635c2cd471312e7;p=thirdparty%2Fcoreutils.git factor: primes_diff idx type consistency * src/factor.c (factor_insert_refind): Use idx_t for indexes into primes_diff, for consistency with other indexes into primes_diff. This has no practical effect unless the primes_diff table becomes unreasonably large. --- diff --git a/src/factor.c b/src/factor.c index c16330047f..e32cf7c3af 100644 --- a/src/factor.c +++ b/src/factor.c @@ -717,9 +717,9 @@ static bool flag_prove_primality = PROVE_PRIMALITY; #endif static void -factor_insert_refind (struct factors *factors, mp_limb_t p, int i, int off) +factor_insert_refind (struct factors *factors, mp_limb_t p, idx_t i, idx_t off) { - for (int j = 0; j < off; j++) + for (idx_t j = 0; j < off; j++) p += primes_diff[i + j]; factor_insert (factors, p); }