]> git.ipfire.org Git - thirdparty/tar.git/commit
Prefer int to idx_t for some small sizes
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Nov 2024 17:37:39 +0000 (10:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:47:23 +0000 (23:47 -0700)
commitbde3e8d6638c6792a33be8c5784777dc9ee62274
tree6200317e3e17116e4d21c8c2adbc145f20d73a36
parent967f5f52f748bdae27fe2e56d8f4653966d95a50
Prefer int to idx_t for some small sizes

* src/create.c (max_octal_val, to_octal, tar_copy_str)
(tar_name_copy_str, to_base256, to_chars_subst, to_chars)
(gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars)
(off_to_chars, time_to_chars, uid_to_chars, string_to_chars)
(split_long_name, write_ustar_long_name, simple_finish_header):
* src/list.c (from_header, gid_from_header, major_from_header)
(minor_from_header, mode_from_header, off_from_header)
(time_from_header, uid_from_header):
Prefer int to idx_t where either will do because the buffer sizes
are known to be small, as this can be a performance win on 32-bit
platforms.  Also, in a few cases the values were negative, whereas
idx_t is supposed to be nonnegative.
src/common.h
src/create.c
src/list.c