Fix exit status

Return the exit status 0 after -h option.
When invalid options are given, it should return exit code 1.
This commit is contained in:
Takashi Iwai 2005-01-31 13:52:09 +00:00
parent b729f4fc30
commit 4cd2c00fb3

View file

@ -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;