From 4cd2c00fb3b422a46642da9bcd072ae1eb86caf1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 31 Jan 2005 13:52:09 +0000 Subject: [PATCH] Fix exit status Return the exit status 0 after -h option. When invalid options are given, it should return exit code 1. --- amixer/amixer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amixer/amixer.c b/amixer/amixer.c index 57912a3..97fe5d5 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -1469,8 +1469,8 @@ int main(int argc, char *argv[]) switch (c) { case 'h': case HELPID_HELP: - morehelp++; - break; + help(); + return 0; case 'c': case HELPID_CARD: { @@ -1512,7 +1512,7 @@ int main(int argc, char *argv[]) } if (morehelp) { help(); - return 0; + return 1; } if (argc - optind <= 0) { return selems(LEVEL_BASIC | level) ? 1 : 0; -- 2.47.1