summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPierre-Yves Ritschard <pyr@cvs.openbsd.org>2009-06-06 08:55:42 +0000
committerPierre-Yves Ritschard <pyr@cvs.openbsd.org>2009-06-06 08:55:42 +0000
commit13bd723f39459bc3835159e553a7c494c498c93b (patch)
tree3af444807745cea1a7eb416519e56d7e2dc02975 /usr.sbin
parent127796729aa64fbda6e38e0b0d8fce38241dd239 (diff)
shuffle code around to achieve 0 length diff nirvana between all the
currently synced daemons' imsg.c, imsg.h and buffer.c
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/buffer.c14
-rw-r--r--usr.sbin/smtpd/imsg.c6
-rw-r--r--usr.sbin/ypldap/imsg.c6
3 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/smtpd/buffer.c b/usr.sbin/smtpd/buffer.c
index 49fe68f668a..466e2578de9 100644
--- a/usr.sbin/smtpd/buffer.c
+++ b/usr.sbin/smtpd/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.3 2009/06/05 21:15:07 pyr Exp $ */
+/* $OpenBSD: buffer.c,v 1.4 2009/06/06 08:55:41 pyr Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -134,6 +134,12 @@ buf_left(struct buf *buf)
return (buf->max - buf->wpos);
}
+void
+buf_close(struct msgbuf *msgbuf, struct buf *buf)
+{
+ buf_enqueue(msgbuf, buf);
+}
+
int
buf_write(struct msgbuf *msgbuf)
{
@@ -180,12 +186,6 @@ buf_write(struct msgbuf *msgbuf)
}
void
-buf_close(struct msgbuf *msgbuf, struct buf *buf)
-{
- buf_enqueue(msgbuf, buf);
-}
-
-void
buf_free(struct buf *buf)
{
free(buf->buf);
diff --git a/usr.sbin/smtpd/imsg.c b/usr.sbin/smtpd/imsg.c
index 5230b2abd7d..403e0e39511 100644
--- a/usr.sbin/smtpd/imsg.c
+++ b/usr.sbin/smtpd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.5 2009/06/06 05:04:12 pyr Exp $ */
+/* $OpenBSD: imsg.c,v 1.6 2009/06/06 08:55:41 pyr Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -33,10 +33,10 @@ imsg_init(struct imsgbuf *ibuf, int fd)
{
msgbuf_init(&ibuf->w);
bzero(&ibuf->r, sizeof(ibuf->r));
- ibuf->pid = getpid();
- TAILQ_INIT(&ibuf->fds);
ibuf->fd = fd;
ibuf->w.fd = fd;
+ ibuf->pid = getpid();
+ TAILQ_INIT(&ibuf->fds);
}
ssize_t
diff --git a/usr.sbin/ypldap/imsg.c b/usr.sbin/ypldap/imsg.c
index d176c9479ef..2a25cb2d34b 100644
--- a/usr.sbin/ypldap/imsg.c
+++ b/usr.sbin/ypldap/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.3 2009/06/06 05:04:12 pyr Exp $ */
+/* $OpenBSD: imsg.c,v 1.4 2009/06/06 08:55:41 pyr Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -33,10 +33,10 @@ imsg_init(struct imsgbuf *ibuf, int fd)
{
msgbuf_init(&ibuf->w);
bzero(&ibuf->r, sizeof(ibuf->r));
- ibuf->pid = getpid();
- TAILQ_INIT(&ibuf->fds);
ibuf->fd = fd;
ibuf->w.fd = fd;
+ ibuf->pid = getpid();
+ TAILQ_INIT(&ibuf->fds);
}
ssize_t