]> git.ipfire.org Git - thirdparty/libarchive.git/commit
archive_utility_string_sort: Use qsort directly
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 29 May 2025 16:19:47 +0000 (18:19 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 30 May 2025 15:41:12 +0000 (17:41 +0200)
commitf90d036057cadfe4a2ee5835648445d4011a927d
tree7290faae40082c42311a83e7f3588d6413f7f996
parent9b07a143ee0e55d04ef602e926f2d343ee5a9a8f
archive_utility_string_sort: Use qsort directly

The utility function "archive_utility_string_sort" is a custom qsort
implementation. Since qsort is specified in C11 and POSIX.1-2008
which libarchive is based on, use system's qsort directly.

The function is not used directly in libarchive, so this is a good
way to save around 500 bytes in resulting library without breaking
compatibility for any user of this function (none found).

Also allows more than UINT_MAX entries which previously were limited
by data type and (way earlier) due to recursion.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_util.c