summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-08 10:54:57 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-08 12:59:22 -0400
commitbd5ce112c92b81a98023513a53ecd64cf44122fe (patch)
treee4efbfabf38f8dee1cb83bc4ee60d698f379b472 /src/app
parent6cea2bd498b15aac14b884916b7dffa76f0547b7 (diff)
downloadtor-bd5ce112c92b81a98023513a53ecd64cf44122fe.tar.gz
tor-bd5ce112c92b81a98023513a53ecd64cf44122fe.zip
Use C99 struct-initializer syntax in COMMANDLINE_ONLY_OPTIONS
I'm about to add more fields to this table, and this syntax change will make it easier to do so.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c54
1 files changed, 30 insertions, 24 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 44d6a82e56..26b1048022 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2463,30 +2463,36 @@ static const struct {
const char *name;
takes_argument_t takes_argument;
} CMDLINE_ONLY_OPTIONS[] = {
- { "-f", ARGUMENT_NECESSARY },
- { "--allow-missing-torrc", ARGUMENT_NONE },
- { "--defaults-torrc", ARGUMENT_NECESSARY },
- { "--hash-password", ARGUMENT_NECESSARY },
- { "--dump-config", ARGUMENT_OPTIONAL },
- { "--list-fingerprint", ARGUMENT_NONE },
- { "--keygen", ARGUMENT_NONE },
- { "--key-expiration", ARGUMENT_OPTIONAL },
- { "--newpass", ARGUMENT_NONE },
- { "--no-passphrase", ARGUMENT_NONE },
- { "--passphrase-fd", ARGUMENT_NECESSARY },
- { "--verify-config", ARGUMENT_NONE },
- { "--ignore-missing-torrc", ARGUMENT_NONE },
- { "--quiet", ARGUMENT_NONE },
- { "--hush", ARGUMENT_NONE },
- { "--version", ARGUMENT_NONE },
- { "--list-modules", ARGUMENT_NONE },
- { "--library-versions", ARGUMENT_NONE },
- { "-h", ARGUMENT_NONE },
- { "--help", ARGUMENT_NONE },
- { "--list-torrc-options", ARGUMENT_NONE },
- { "--list-deprecated-options",ARGUMENT_NONE },
- { "--nt-service", ARGUMENT_NONE },
- { "-nt-service", ARGUMENT_NONE },
+ { .name="-f",
+ .takes_argument=ARGUMENT_NECESSARY },
+ { .name="--allow-missing-torrc" },
+ { .name="--defaults-torrc",
+ .takes_argument=ARGUMENT_NECESSARY },
+ { .name="--hash-password",
+ .takes_argument=ARGUMENT_NECESSARY },
+ { .name="--dump-config",
+ .takes_argument=ARGUMENT_OPTIONAL },
+ { .name="--list-fingerprint" },
+ { .name="--keygen" },
+ { .name="--key-expiration",
+ .takes_argument=ARGUMENT_OPTIONAL },
+ { .name="--newpass" },
+ { .name="--no-passphrase" },
+ { .name="--passphrase-fd",
+ .takes_argument=ARGUMENT_NECESSARY },
+ { .name="--verify-config" },
+ { .name="--ignore-missing-torrc" },
+ { .name="--quiet" },
+ { .name="--hush" },
+ { .name="--version" },
+ { .name="--list-modules" },
+ { .name="--library-versions" },
+ { .name="-h" },
+ { .name="--help" },
+ { .name="--list-torrc-options" },
+ { .name="--list-deprecated-options" },
+ { .name="--nt-service" },
+ { .name="-nt-service" },
{ NULL, 0 },
};