]> git.ipfire.org Git - thirdparty/coreutils.git/commit
expand: prefer xpalloc to x2nrealloc
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 7 Nov 2024 00:31:18 +0000 (16:31 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Nov 2024 07:41:18 +0000 (23:41 -0800)
commit97807bff17e1ea55bd72176923ddcc197693cf1a
treee8fd3044252a812fbbf70f3ef56b42d6670a5e95
parent7e86be8dbb62441430a252ab759cec3e85b4afdd
expand: prefer xpalloc to x2nrealloc

* src/expand-common.c (max_column_width, n_tabs_allocated)
(first_free_tab, add_tab_stop, parse_tab_stops, validate_tab_stops)
(get_next_tab_column):
Use idx_t for sizes.  All uses changed.
(add_tab_stop): Use xpalloc instead of X2NREALLOC.
Use ckd_add to check for overflow, instead of doing it by hand.
src/expand-common.c
src/expand-common.h
src/expand.c
src/unexpand.c