diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-08-17 11:04:10 +0200 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-08-17 11:04:41 +0200 |
commit | e3811ad871753a777cb2f66a36e31e116a6be29d (patch) | |
tree | 7a0a15c5c1c38088ccb3acadfe445cf9c1782bdd | |
parent | 967e3e5f960022f3afbc21e5abed6a67b857b866 (diff) | |
download | termsend-e3811ad871753a777cb2f66a36e31e116a6be29d.tar.gz termsend-e3811ad871753a777cb2f66a36e31e116a6be29d.tar.bz2 termsend-e3811ad871753a777cb2f66a36e31e116a6be29d.zip |
src/config.c: do not return error on -v and -h
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r-- | src/config.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c index 33900bd..9d1b4e3 100644 --- a/src/config.c +++ b/src/config.c @@ -288,7 +288,7 @@ static int config_parse_arguments "\t 0 disable list (everyone can upload\n" "\t 1 whitelist mode, only ips from list can upload\n"); - exit(1); + exit(0); case 'v': fprintf(stdout, @@ -304,19 +304,22 @@ static int config_parse_arguments #endif "ssl\n"); - exit(1); + exit(0); case ':': fprintf(stderr, "option -%c, --%s requires an argument\n", optopt, longopts[loptind].name); + fprintf(stderr, "check --help for info about usage\n"); return -1; case '?': - fprintf(stdout, "unknown option %s\n", argv[optind - 1]); + fprintf(stderr, "unknown option %s\n", argv[optind - 1]); + fprintf(stderr, "check --help for info about usage\n"); return -1; default: fprintf(stderr, "unexpected return from getopt '0x%02x'\n", arg); + fprintf(stderr, "check --help for info about usage\n"); return -1; } } |