]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: buffers: remove unused function buffer_contig_data()
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Mar 2012 10:36:00 +0000 (11:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 May 2012 10:28:10 +0000 (12:28 +0200)
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

index ec8eaab2ba70ff12889aeb41c57c35edb182bd22..18495b58fb568e96a42b3cbd6b6beb3a429fd976 100644 (file)
@@ -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)
 {