summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-07-03 10:57:49 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-07-03 10:57:49 +0200
commit305618f6c1a28bc035f5abbdfd78c10168fe3907 (patch)
tree2c2f568ea646d98c5c043740da53a2e4c9328723
parent9bbea50ceaf3c6defdec9971bcbac5f7c419e94d (diff)
downloadaports-cache-305618f6c1a28bc035f5abbdfd78c10168fe3907.tar.bz2
aports-cache-305618f6c1a28bc035f5abbdfd78c10168fe3907.tar.xz
exit after show usage
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index c3a4203..2b48d05 100644
--- a/main.c
+++ b/main.c
@@ -5,8 +5,9 @@
#include <fcntl.h>
#include <getopt.h>
#include <limits.h>
-#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
#include "aports-cache.h"
@@ -22,6 +23,7 @@ static void usage(int exitcode)
" -v,--verbose enable verbose mode\n"
" -s,--shell PROG use PROG as shell instead of /bin/sh\n"
"\n", program_invocation_name);
+ exit(exitcode);
}
int main(int argc, char *argv[])