From 7a06bf8fcbdff0f3175e9648cf928863b827a66b Mon Sep 17 00:00:00 2001 From: Damien Pollet Date: Tue, 17 Dec 2013 12:53:51 +0100 Subject: [PATCH] Exit successfully with --help Passing --help is a legitimate use, so it should not exit(1). Besides, this is useful to test whether the command is available. --- shairport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shairport.c b/shairport.c index 3d214a4ce..470ee7db2 100644 --- a/shairport.c +++ b/shairport.c @@ -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;