]> git.ipfire.org Git - thirdparty/xz.git/commit
xz: Move some list_file() checks to args_parse().
authorJia Tan <jiat0218@gmail.com>
Sat, 21 Oct 2023 14:55:51 +0000 (22:55 +0800)
committerJia Tan <jiat0218@gmail.com>
Mon, 29 Jan 2024 13:40:53 +0000 (21:40 +0800)
commit882aad963ef09ec13ad20d11af4a3c1be4868eb0
treeba08ebbb450d3d259cbf91b4dfc789697e5c23f6
parentd6d1e40f195440b198e6c57d5283b63037dcee92
xz: Move some list_file() checks to args_parse().

The checks enforce that list mode will only run on .xz files. The
opt_format is only set during argument parsing and will not change
after. So we only need to check this once instead of every call to
list_file(). Additionally, this will cause the error to be detected
slightly earlier.
src/xz/args.c
src/xz/list.c