diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-24 10:39:48 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-24 10:39:48 +0000 |
commit | 8d6ae384be450ca7b53b0a718249a86fb46bf412 (patch) | |
tree | a2cf4371d1128d168495af2febbabd44c7dbc688 /gmid.c | |
parent | 7b31a6386d6f80a3dd79af7d56bbf48b6eb7a264 (diff) |
move configuration init stuff in its own function
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -362,13 +362,10 @@ usage(const char *me) me); } -int -main(int argc, char **argv) +void +init_config(void) { - int ch, p[2]; - const char *config_path = NULL; size_t i; - int conftest = 0; bzero(hosts, sizeof(hosts)); for (i = 0; i < HOSTSLEN; ++i) @@ -380,6 +377,14 @@ main(int argc, char **argv) conf.protos = TLS_PROTOCOL_TLSv1_2 | TLS_PROTOCOL_TLSv1_3; init_mime(&conf.mime); +} + +int +main(int argc, char **argv) +{ + int ch, p[2]; + const char *config_path = NULL; + int conftest = 0; while ((ch = getopt(argc, argv, "6C:c:d:fhK:np:x:")) != -1) { switch (ch) { |