]> git.ipfire.org Git - thirdparty/tar.git/commit
Streamline compression suffix detection
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Nov 2024 16:40:36 +0000 (09:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:47:23 +0000 (23:47 -0700)
commit23582f3445083a3a1830a241dd5cd51a9e8a302e
tree72843ea525c66eb8a76bd6646fee39a0a6cbec17
parent317e4d6a3c834fc6209dacff73d5954b13f5338c
Streamline compression suffix detection

* src/suffix.c (struct compression_suffix):
Use arrays rather than pointers that need relocation.
All uses changed.
(compression_suffixes): Now const.
Omit trailing null entry; all uses changed.
(find_compression_suffix): Simplify length calculations.
No longer any need to call strlen.
src/suffix.c