diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-09-13 16:49:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-09-13 16:49:29 +0000 |
commit | 21e99b7310ef5dda53715d257b04954c9e37e816 (patch) | |
tree | c338f6b1c6fea3c1d1cb0f47702afae9140a8cc2 /usr.sbin/acme-client/main.c | |
parent | d31476be203112a975b093e00645e456b5a5777f (diff) |
hoist local variable initialization directly into the definitions,
rather than doing it right afterwards.
ok florian
Diffstat (limited to 'usr.sbin/acme-client/main.c')
-rw-r--r-- | usr.sbin/acme-client/main.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/usr.sbin/acme-client/main.c b/usr.sbin/acme-client/main.c index 44a8f4f408b..5231230b468 100644 --- a/usr.sbin/acme-client/main.c +++ b/usr.sbin/acme-client/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.11 2016/09/13 16:04:51 deraadt Exp $ */ +/* $Id: main.c,v 1.12 2016/09/13 16:49:28 deraadt Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -81,25 +81,19 @@ doasprintf(const char *fmt, ...) int main(int argc, char *argv[]) { - const char *domain, *agreement; - char *certdir, *acctkey, *chngdir, *keyfile; - int key_fds[2], acct_fds[2], chng_fds[2], - cert_fds[2], file_fds[2], dns_fds[2], - rvk_fds[2]; + const char *domain, *agreement = NULL, **alts = NULL; + char *certdir = NULL, *acctkey = NULL, *chngdir = NULL; + char *keyfile = NULL; + int key_fds[2], acct_fds[2], chng_fds[2], cert_fds[2]; + int file_fds[2], dns_fds[2], rvk_fds[2]; + int newacct = 0, remote = 0, backup = 0; + int force = 0, multidir = 0, newkey = 0; + int c, rc, revocate = 0; + int authority = DEFAULT_AUTHORITY; pid_t pids[COMP__MAX]; - int c, rc, newacct, remote, revocate, force, - multidir, newkey, backup, authority; extern int verbose; extern enum comp proccomp; size_t i, altsz, ne; - const char **alts; - - alts = NULL; - newacct = remote = revocate = verbose = force = - multidir = newkey = backup = 0; - authority = DEFAULT_AUTHORITY; - certdir = keyfile = acctkey = chngdir = NULL; - agreement = NULL; while (-1 != (c = getopt(argc, argv, "bFmnNrs:tva:f:c:C:k:"))) switch (c) { |