diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2009-06-06 05:04:13 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2009-06-06 05:04:13 +0000 |
commit | af1fe0a1c6d54e4177e0f0294d68760b077bd998 (patch) | |
tree | da47ae2b265da93ed845799bca2513e553509a6b /usr.sbin/relayd | |
parent | 9c0f247f8410c21551862c29f75afcc0e5688f86 (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.c | 12 |
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 |