From 62822b184887d858fb2f877b16b2ef3291b991c1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 25 Jun 2009 16:07:00 +0000 Subject: Nuke unused buffer functions. Found by lint. Also remove some old debug output which was #if 0. --- buffer-poll.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'buffer-poll.c') diff --git a/buffer-poll.c b/buffer-poll.c index 40c1984b..b3e4a8de 100644 --- a/buffer-poll.c +++ b/buffer-poll.c @@ -1,4 +1,4 @@ -/* $Id: buffer-poll.c,v 1.11 2009-05-13 23:27:00 nicm Exp $ */ +/* $OpenBSD: buffer-poll.c,v 1.2 2009/06/25 06:05:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -66,9 +66,6 @@ buffer_poll(struct pollfd *pfd, struct buffer *in, struct buffer *out) } if (BUFFER_USED(out) > 0 && pfd->revents & POLLOUT) { n = write(pfd->fd, BUFFER_OUT(out), BUFFER_USED(out)); -#if 0 - log_debug("buffer_poll: fd=%d, write=%zd", pfd->fd, n); -#endif if (n == -1) { if (errno != EINTR && errno != EAGAIN) return (-1); @@ -77,23 +74,3 @@ buffer_poll(struct pollfd *pfd, struct buffer *in, struct buffer *out) } return (0); } - -/* Flush buffer output to socket. */ -void -buffer_flush(int fd, struct buffer *in, struct buffer *out) -{ - struct pollfd pfd; - - while (BUFFER_USED(out) > 0) { - buffer_set(&pfd, fd, in, out); - - if (poll(&pfd, 1, INFTIM) == -1) { - if (errno == EAGAIN || errno == EINTR) - continue; - fatal("poll failed"); - } - - if (buffer_poll(&pfd, in, out) != 0) - break; - } -} -- cgit v1.2.3