summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-09-29 18:42:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-09-29 18:42:55 +0000
commitcbe9be824d4681cfc4faaf4c9544444b76acde25 (patch)
tree74d93d20cbcb568dee83759bc2770e105d2b6341 /usr.sbin
parent43548814949e69f9a9b3d174f98acedf7963469b (diff)
initialize both sides of the lockpipe (only used in debug mode) to -1 to
have averted the bug found in pr 5938
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/syslogd/syslogd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index bab13ff2148..57725003bc3 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.101 2008/04/21 22:09:51 mpf Exp $ */
+/* $OpenBSD: syslogd.c,v 1.102 2008/09/29 18:42:54 deraadt Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#else
-static const char rcsid[] = "$OpenBSD: syslogd.c,v 1.101 2008/04/21 22:09:51 mpf Exp $";
+static const char rcsid[] = "$OpenBSD: syslogd.c,v 1.102 2008/09/29 18:42:54 deraadt Exp $";
#endif
#endif /* not lint */
@@ -298,7 +298,7 @@ main(int argc, char *argv[])
socklen_t len;
char *p, *line;
char resolve[MAXHOSTNAMELEN];
- int lockpipe[2], nullfd;
+ int lockpipe[2] = { -1, -1}, nullfd;
struct addrinfo hints, *res, *res0;
FILE *fp;