summaryrefslogtreecommitdiff
path: root/sbin/unwind/unwind.c
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-11-26 19:35:14 +0000
committerkn <kn@cvs.openbsd.org>2019-11-26 19:35:14 +0000
commit367f04728e75d93cab1b6bfb1332fc8920eb4169 (patch)
treecd454d660f5aa57fbde3a16a3bc409d83301d7e0 /sbin/unwind/unwind.c
parentd244879b518587cdfd71007570d172fa2e187bcc (diff)
Improve previous
Avoid an extra parameter and set NULL initialised conffile conditionally. From Matthew Martin <phy1729 at gmail dot com>, thanks!
Diffstat (limited to 'sbin/unwind/unwind.c')
-rw-r--r--sbin/unwind/unwind.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c
index 7ed76600f3b..e514868fc22 100644
--- a/sbin/unwind/unwind.c
+++ b/sbin/unwind/unwind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unwind.c,v 1.38 2019/11/26 18:09:15 kn Exp $ */
+/* $OpenBSD: unwind.c,v 1.39 2019/11/26 19:35:13 kn Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -77,8 +77,7 @@ struct uw_conf *main_conf;
struct imsgev *iev_frontend;
struct imsgev *iev_resolver;
struct imsgev *iev_captiveportal;
-char *conffile = CONF_FILE;
-int require_file;
+char *conffile;
pid_t frontend_pid;
pid_t resolver_pid;
@@ -158,7 +157,6 @@ main(int argc, char *argv[])
break;
case 'f':
conffile = optarg;
- require_file = 1;
break;
case 'n':
cmd_opts |= OPT_NOACTION;
@@ -188,7 +186,7 @@ main(int argc, char *argv[])
else if (captiveportal_flag)
captiveportal(debug, cmd_opts & (OPT_VERBOSE | OPT_VERBOSE2));
- if ((main_conf = parse_config(conffile, require_file)) == NULL)
+ if ((main_conf = parse_config(conffile)) == NULL)
exit(1);
if (cmd_opts & OPT_NOACTION) {
@@ -692,7 +690,7 @@ main_reload(void)
{
struct uw_conf *xconf;
- if ((xconf = parse_config(conffile, require_file)) == NULL)
+ if ((xconf = parse_config(conffile)) == NULL)
return (-1);
if (main_imsg_send_config(xconf) == -1)