mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:05:41 +01:00
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:
parent
b729f4fc30
commit
4cd2c00fb3
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue