diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-27 15:29:46 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-27 17:12:27 -0700 |
| commit | 97d8dcc5ca433471eac0609c0e8d51d40082876f (patch) | |
| tree | 2171fc25abecfe4f3cd37d270631c971640fa8dd /scripts/git-hooks/commit-msg | |
| parent | maint: avoid new syntax-check failure (diff) | |
| download | coreutils-97d8dcc5ca433471eac0609c0e8d51d40082876f.tar.gz coreutils-97d8dcc5ca433471eac0609c0e8d51d40082876f.zip | |
basenc: prefer signed to unsigned integers
This patch modifies basenc to prefer signed integers to
unsigned, as signed are less error-prone.
This patch also updates Gnulib to to latest, which updates Gnulib’s
base32 and base64 modules to prefer signed to unsigned integers.
* src/basenc.c: Include idx.h.
(struct base2_decode_context): Use unsigned char, not unsigned
for an octet that must fit in an unsigned char.
(base_encode, struct base_decode_context)
(base64_decode_ctx_wrapper, prepare_inbuf, base64url_encode)
(base64url_decode_ctx_wrapper, base32_decode_ctx_wrapper)
(base32hex_encode, base32hex_decode_ctx_wrapper, base16_encode)
(base16_decode_ctx, z85_encode, Z85_HI_CTX_TO_32BIT_VAL)
(z85_decoding, z85_decode_ctx, base2msbf_encode)
(base2lsbf_encode, base2lsbf_decode_ctx, base2msbf_decode_ctx)
(wrap_write, do_encode, do_decode, main):
Prefer signed integers to unsigned.
(main): Treat extremely large wrap columns as if they were
infinite; that’s good enough. Since we’re now using xstrtoimax,
this allows ‘-w -0’ (same as ‘-w 0’).
* tests/misc/base64.pl (gen_tests): -w-0 is no longer an error.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
