[PATCH 1/2] dfa, etc.: prefer xreallocarray to older name

2021-05-30 Thread Paul Eggert
* lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist): * lib/readtokens.c (readtokens): * tests/uninorm/test-u32-normalize-big.c: (read_normalization_test_file): Prefer xreallocarray to the equivalent xnrealloc. The newer name follows the glibc lead of ‘reallocarray’. --- ChangeLog

[PATCH 2/2] reallocarray-tests: port to weird platforms

2021-05-30 Thread Paul Eggert
* tests/test-reallocarray.c (main): Don’t assume that PTRDIFF_MAX / 2 + 1 <= SIZE_MAX. POSIX allows platforms where this isn’t true, though I don’t know of any examples. --- ChangeLog | 5 + tests/test-reallocarray.c | 9 ++--- 2 files changed, 11 insertions(+), 3 deletion