From 38a8ff7fc5d4b04f80b64b84df53bd009f3a7ef2 Mon Sep 17 00:00:00 2001 From: benno Date: Mon, 30 Jul 2018 09:51:49 +0000 Subject: [PATCH] reorder option parsing to be alphabetical/same order as usage and manpage. From Ross L Richardson. --- usr.sbin/acme-client/main.c | 24 ++++++++++++------------ 1 file 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 * @@ -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; } -- 2.20.1