]> git.ipfire.org Git - thirdparty/coreutils.git/commit
factor: factor insertion simplifications
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 May 2025 01:58:21 +0000 (18:58 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Jul 2025 00:12:39 +0000 (17:12 -0700)
commit77717f597eda5e92963773bcfbf2010fe284ed09
treeb8b69a701af3579609dd7ecc407a92b515a6f2e7
parent374f5fdcc1cca96e2ae89168eba7d9f25c4d48c9
factor: factor insertion simplifications

* src/factor.c (factor_insert_multiplicity):
Adjust to keep in sync with mp_factor_insert changes below,
by adding 1 to the index and using memmove to move.
(mp_factor_insert): Omit redundant call to mpz_cmp.
Prefer idx_t (always nonnegative) to ptrdiff_t,
by adding 1 to the indexes.
Prefer mpz_init_set to mpz_init+mpz_set.
Use memmove to move, rather than doing it by hand.
src/factor.c