]> git.ipfire.org Git - thirdparty/tar.git/commit
Prefer other types to int in names.c
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 02:49:02 +0000 (19:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:47:23 +0000 (23:47 -0700)
commit41143ee46fae751c6a855cfc97c3f615b0715b18
treebedb91103d84acf115a4a58b27cf36ceb2681619
parentf96aff3ce92fc1afd1e4ce742dd0ebf729eb293e
Prefer other types to int in names.c

* src/names.c (uname_to_uid, gname_to_gid, handle_option)
(make_file_name): Prefer bool for boolean.
(struct name_elt, read_name_from_file): Prefer char for char.
(handle_option): Invert sense of return value, for clarity.
All uses changed.
(merge_sort_sll, merge_sort, collect_and_sort_names):
Don’t assume list length fits in int.  Use intptr_t not idx_t,
since the bound is the size of all memory rather than one array.
src/names.c