From 3f7ff1406c6172e8feff64e254fcacfe99beca92 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Mar 2012 11:36:00 +0100 Subject: [PATCH] MINOR: buffers: remove unused function buffer_contig_data() This one was never used and is buggy. It will be easier to rewrite it when the buffer rework is complete. --- include/proto/buffers.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/include/proto/buffers.h b/include/proto/buffers.h index ec8eaab2b..18495b58f 100644 --- a/include/proto/buffers.h +++ b/include/proto/buffers.h @@ -273,31 +273,6 @@ static inline int buffer_almost_full(const struct buffer *buf) return 0; } -/* - * Return the max amount of bytes that can be read from the buffer at once. - * Note that this may be lower than the actual buffer length when the data - * wrap after the end, so it's preferable to call this function again after - * reading. Also note that this function respects the ->o limit. - */ -static inline int buffer_contig_data(struct buffer *buf) -{ - int ret; - - if (!buf->o) - return 0; - - if (buf->r > buf->w) - ret = buf->r - buf->w; - else - ret = buf->data + buf->size - buf->w; - - /* limit the amount of outgoing data if required */ - if (ret > buf->o) - ret = buf->o; - - return ret; -} - /* Returns true if the buffer's input is already closed */ static inline int buffer_input_closed(struct buffer *buf) {