summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorPierre-Yves Ritschard <pyr@cvs.openbsd.org>2009-06-06 05:04:13 +0000
committerPierre-Yves Ritschard <pyr@cvs.openbsd.org>2009-06-06 05:04:13 +0000
commitaf1fe0a1c6d54e4177e0f0294d68760b077bd998 (patch)
treeda47ae2b265da93ed845799bca2513e553509a6b /usr.sbin/relayd
parent9c0f247f8410c21551862c29f75afcc0e5688f86 (diff)
remove unnecessary and scary pid check in imsg_init.
ok eric@, claudio@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/imsg.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.sbin/relayd/imsg.c b/usr.sbin/relayd/imsg.c
index b91d123e266..03927497313 100644
--- a/usr.sbin/relayd/imsg.c
+++ b/usr.sbin/relayd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.23 2009/06/05 23:39:51 pyr Exp $ */
+/* $OpenBSD: imsg.c,v 1.24 2009/06/06 05:04:12 pyr Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -31,14 +31,12 @@
void
imsg_init(struct imsgbuf *ibuf, int fd)
{
- if (!ibuf->pid) {
- msgbuf_init(&ibuf->w);
- bzero(&ibuf->r, sizeof(ibuf->r));
- ibuf->pid = getpid();
- TAILQ_INIT(&ibuf->fds);
- }
+ msgbuf_init(&ibuf->w);
+ bzero(&ibuf->r, sizeof(ibuf->r));
ibuf->fd = fd;
ibuf->w.fd = fd;
+ ibuf->pid = getpid();
+ TAILQ_INIT(&ibuf->fds);
}
ssize_t