Skip to content

Commit

Permalink
Exit successfully with --help
Browse files Browse the repository at this point in the history
Passing --help is a legitimate use, so it should not exit(1). Besides,
this is useful to test whether the command is available.
  • Loading branch information
cdlm authored and abrasive committed Jun 24, 2014
1 parent 2c4031f commit 7a06bf8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shairport.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ int parse_options(int argc, char **argv) {
long_options, NULL)) > 0) {
switch (opt) {
default:
case 'h':
usage(argv[0]);
exit(1);
case 'h':
usage(argv[0]);
exit(0);
case 'd':
config.daemonise = 1;
break;
Expand Down

0 comments on commit 7a06bf8

Please sign in to comment.