summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2014-10-13 01:53:14 +0000
committerdlg <dlg@openbsd.org>2014-10-13 01:53:14 +0000
commit2f2695c65f9a41724ee806e513caedbeb9b834fe (patch)
treeda1b23fe336846ab198196a18b3cf56bfe82c426 /usr.sbin/inetd
parentwhitespace (diff)
downloadwireguard-openbsd-2f2695c65f9a41724ee806e513caedbeb9b834fe.tar.xz
wireguard-openbsd-2f2695c65f9a41724ee806e513caedbeb9b834fe.zip
dont need to store the same debug flag in two separate variables.
ok millert@ deraadt@
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r--usr.sbin/inetd/inetd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index d9fb538dd1c..5863c7ae052 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.140 2014/10/12 09:36:42 dlg Exp $ */
+/* $OpenBSD: inetd.c,v 1.141 2014/10/13 01:53:14 dlg Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -162,7 +162,6 @@ int nsock, maxsock;
fd_set *allsockp;
int allsockn;
int toomany = TOOMANY;
-int options;
int timingout;
struct servent *sp;
uid_t uid;
@@ -330,7 +329,6 @@ main(int argc, char *argv[])
switch (ch) {
case 'd':
debug = 1;
- options |= SO_DEBUG;
break;
case 'R': { /* invocation rate */
char *p;
@@ -962,7 +960,7 @@ setup(struct servtab *sep)
}
#define turnon(fd, opt) \
setsockopt(fd, SOL_SOCKET, opt, &on, sizeof (on))
- if (strncmp(sep->se_proto, "tcp", 3) == 0 && (options & SO_DEBUG) &&
+ if (strncmp(sep->se_proto, "tcp", 3) == 0 && debug &&
turnon(sep->se_fd, SO_DEBUG) < 0)
syslog(LOG_ERR, "setsockopt (SO_DEBUG): %m");
if (turnon(sep->se_fd, SO_REUSEADDR) < 0)