From 57de570db7b71afdfbc1b81e194fc1d568298b6a Mon Sep 17 00:00:00 2001 From: Kate Date: Tue, 15 Dec 2020 20:09:20 +0000 Subject: [PATCH] Do not return exit status 2 when given -h This is rather surprising for pixz to "fail" when giving `--help`/`-h`. --- src/pixz.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pixz.c b/src/pixz.c index 229eadb..73ed1bf 100644 --- a/src/pixz.c +++ b/src/pixz.c @@ -51,7 +51,9 @@ static void usage(const char *msg) { "https://github.com/vasi/pixz\n" "You may use this software under the FreeBSD License\n", PACKAGE_VERSION); - exit(2); + if (msg) + exit(2); + exit(0); } int main(int argc, char **argv) {