commit 5126459eccd062f2a9442b716a21eafd9e85f766
parent b88388b172cdb1c2f79bab6c453cd253cc0895b4
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Fri, 14 Sep 2018 15:18:09 +0200
main: Fix the order of --help and -h option handling
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -359,7 +359,7 @@ int main(int argc, char *argv[])
for (;;) {
int opt;
- opt = getopt_long(argc, argv, "Bi:I:p:P:c:vd::h",
+ opt = getopt_long(argc, argv, "Bi:I:p:P:c:d::vh",
main_options, NULL);
if (opt < 0)
break;
@@ -380,9 +380,6 @@ int main(int argc, char *argv[])
case 'P':
nophys = optarg;
break;
- case 'v':
- printf("%s\n", VERSION);
- return EXIT_SUCCESS;
case 'c':
config_dir = optarg;
break;
@@ -400,6 +397,9 @@ int main(int argc, char *argv[])
else
debugopt = "*";
break;
+ case 'v':
+ printf("%s\n", VERSION);
+ return EXIT_SUCCESS;
case 'h':
usage();
return EXIT_SUCCESS;