summaryrefslogtreecommitdiff
path: root/usr.sbin/acme-client/main.c
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2018-07-30 09:51:50 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2018-07-30 09:51:50 +0000
commit83b72504d9348dcb11b575fe23900650553fc4eb (patch)
tree93aecad8de1bf637aabd866f5e2d89f9636a863f /usr.sbin/acme-client/main.c
parent4c71f49d16a7247d9c8792d18ef4a9fd4cb0de4d (diff)
reorder option parsing to be alphabetical/same order as usage and
manpage. From Ross L Richardson.
Diffstat (limited to 'usr.sbin/acme-client/main.c')
-rw-r--r--usr.sbin/acme-client/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/acme-client/main.c b/usr.sbin/acme-client/main.c
index 58eb0d40175..632e00250ef 100644
--- a/usr.sbin/acme-client/main.c
+++ b/usr.sbin/acme-client/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.36 2017/11/27 01:58:52 florian Exp $ */
+/* $Id: main.c,v 1.37 2018/07/30 09:51:49 benno Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -56,21 +56,24 @@ main(int argc, char *argv[])
struct domain_c *domain = NULL;
struct altname_c *ac;
- while ((c = getopt(argc, argv, "FADrvnf:")) != -1)
+ while ((c = getopt(argc, argv, "ADFnrvf:")) != -1)
switch (c) {
- case 'f':
- if ((conffile = strdup(optarg)) == NULL)
- err(EXIT_FAILURE, "strdup");
- break;
- case 'F':
- force = 1;
- break;
case 'A':
popts |= ACME_OPT_NEWACCT;
break;
case 'D':
popts |= ACME_OPT_NEWDKEY;
break;
+ case 'F':
+ force = 1;
+ break;
+ case 'f':
+ if ((conffile = strdup(optarg)) == NULL)
+ err(EXIT_FAILURE, "strdup");
+ break;
+ case 'n':
+ popts |= ACME_OPT_CHECK;
+ break;
case 'r':
revocate = 1;
break;
@@ -78,9 +81,6 @@ main(int argc, char *argv[])
verbose = verbose ? 2 : 1;
popts |= ACME_OPT_VERBOSE;
break;
- case 'n':
- popts |= ACME_OPT_CHECK;
- break;
default:
goto usage;
}