summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2019-10-07 17:44:45 +0000
committertedu <tedu@openbsd.org>2019-10-07 17:44:45 +0000
commit7877c6844cdd6a308f2927269f2dd185f0e4c96f (patch)
tree0d9ec64b6145714c4f3fa852e630411a880ecd1e
parentAttach Hyper-V guest services to VMBus 4.0 (diff)
downloadwireguard-openbsd-7877c6844cdd6a308f2927269f2dd185f0e4c96f.tar.xz
wireguard-openbsd-7877c6844cdd6a308f2927269f2dd185f0e4c96f.zip
worker should always get a conffd, and if we don't, it's an error.
fixes compiler warning via deraadt
-rw-r--r--usr.sbin/rebound/rebound.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/rebound/rebound.c b/usr.sbin/rebound/rebound.c
index 8dab30cad79..92c3b457da4 100644
--- a/usr.sbin/rebound/rebound.c
+++ b/usr.sbin/rebound/rebound.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rebound.c,v 1.108 2019/04/01 06:40:05 tedu Exp $ */
+/* $OpenBSD: rebound.c,v 1.109 2019/10/07 17:44:45 tedu Exp $ */
/*
* Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
*
@@ -1325,7 +1325,7 @@ main(int argc, char **argv)
argc -= optind;
if (worker) {
- int conffd;
+ int conffd = -1;
/* rewind "--" argument */
argv--;
@@ -1350,6 +1350,8 @@ main(int argc, char **argv)
break;
}
}
+ if (conffd == -1)
+ logerr("never received conffd");
argv += optind;
argc -= optind;
if (argc)