diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2009-06-03 05:35:07 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2009-06-03 05:35:07 +0000 |
commit | ef2d875916ecef7ebe18511d2b999350902c0a92 (patch) | |
tree | 6913b609fff976fb7b08d2e1837e17023b224dc4 /usr.sbin | |
parent | a28e3fd1f5bbeaaff608c31cb1cb738eadb8ad98 (diff) |
change buf_close return type to void.
that function is not supposed to report anything remotely useful,
or fail in any meaningful way.
ok pyr@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/buffer.c | 5 | ||||
-rw-r--r-- | usr.sbin/relayd/imsg.c | 11 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.h | 4 |
3 files changed, 7 insertions, 13 deletions
diff --git a/usr.sbin/relayd/buffer.c b/usr.sbin/relayd/buffer.c index 2aec7667d32..0ac535c42e8 100644 --- a/usr.sbin/relayd/buffer.c +++ b/usr.sbin/relayd/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.16 2009/06/02 22:02:01 eric Exp $ */ +/* $OpenBSD: buffer.c,v 1.17 2009/06/03 05:35:06 eric Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -141,11 +141,10 @@ buf_left(struct buf *buf) return (buf->max - buf->wpos); } -int +void buf_close(struct msgbuf *msgbuf, struct buf *buf) { buf_enqueue(msgbuf, buf); - return (1); } void diff --git a/usr.sbin/relayd/imsg.c b/usr.sbin/relayd/imsg.c index c65f4b6d92c..1f84279bc7f 100644 --- a/usr.sbin/relayd/imsg.c +++ b/usr.sbin/relayd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.14 2008/03/24 16:11:05 deraadt Exp $ */ +/* $OpenBSD: imsg.c,v 1.15 2009/06/03 05:35:06 eric Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -226,19 +226,14 @@ imsg_add(struct buf *msg, void *data, u_int16_t datalen) int imsg_close(struct imsgbuf *ibuf, struct buf *msg) { - int n; struct imsg_hdr *hdr; hdr = (struct imsg_hdr *)msg->buf; hdr->len = (u_int16_t)msg->wpos; - if ((n = buf_close(&ibuf->w, msg)) < 0) { - log_warnx("imsg_close: buf_close error"); - buf_free(msg); - return (-1); - } + buf_close(&ibuf->w, msg); imsg_event_add(ibuf); - return (n); + return (1); } void diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index 2bc243868c2..87540a4b6c3 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.118 2009/06/02 22:02:01 eric Exp $ */ +/* $OpenBSD: relayd.h,v 1.119 2009/06/03 05:35:06 eric Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -792,7 +792,7 @@ void *buf_reserve(struct buf *, size_t); void *buf_seek(struct buf *, size_t, size_t); size_t buf_size(struct buf *); size_t buf_left(struct buf *); -int buf_close(struct msgbuf *, struct buf *); +void buf_close(struct msgbuf *, struct buf *); void buf_free(struct buf *); void msgbuf_init(struct msgbuf *); void msgbuf_clear(struct msgbuf *); |