]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cksum: minor crctab generation cleanups
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 19 Feb 2025 04:09:10 +0000 (20:09 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 19 Feb 2025 04:10:19 +0000 (20:10 -0800)
commit6ac924f31910168512dc93eceb55d0e98e1f0a97
tree45daab288fcbe5b19bbd3a10128cabb390ea6484
parent785ba51591335ffcee1defd24cd8235ef24c4092
cksum: minor crctab generation cleanups

* src/cksum.c [CRCTAB]: Include only config.h and stdio.h,
to simplify the crctab-generating code.
[!CRCTAB]: Do not include stdint.h or stdio.h, as cksum.h does it now.
(BIT, r, crc_remainder, main) [CRCTAB]: Use unsigned int, not
uint_fast32_t or uint32_t, as this is good enough for GNU where
unsigned int is guaranteed to be at least 32 bits, and this way we
needn’t worry about mismatches between %08x formats and uint_fast32_t.
(main) [CRCTAB]: Prefer more-local decls.  Do not output
unnecessary directives to include stdint.h or stdio.h.
No need for ‘return EXIT_SUCCESS;’ nowadays.
* src/crctab.c: Regenerate.
src/cksum.c
src/crctab.c