diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-06-04 08:07:23 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-07-09 17:12:39 -0700 |
| commit | 845f3a6158be04d9cfa30db14635c2cd471312e7 (patch) | |
| tree | fe34f3a5d84dc367891dd11eb4dd349d9817ccd6 | |
| parent | factor: omit q from mp_factor_using_division (diff) | |
| download | coreutils-845f3a6158be04d9cfa30db14635c2cd471312e7.tar.gz coreutils-845f3a6158be04d9cfa30db14635c2cd471312e7.zip | |
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.
| -rw-r--r-- | src/factor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/factor.c b/src/factor.c index c16330047..e32cf7c3a 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); } |
