CLEANUP: buffers: remove unused function buffer_contig_space_with_res()
This function is now unused and was dangerous. Its cousin
buffer_contig_space_res() was removed as well since it was the only
one to use it.
diff --git a/include/common/buffer.h b/include/common/buffer.h
index 18ced91..2d657d1 100644
--- a/include/common/buffer.h
+++ b/include/common/buffer.h
@@ -228,29 +228,6 @@
return right - left;
}
-/* Return the amount of bytes that can be written into the buffer at once,
- * excluding the amount of reserved space passed in <res>, which is
- * preserved.
- */
-static inline int buffer_contig_space_with_res(const struct buffer *buf, int res)
-{
- /* Proceed differently if the buffer is full, partially used or empty.
- * The hard situation is when it's partially used and either data or
- * reserved space wraps at the end.
- */
- int spare = buf->size - res;
-
- if (buffer_len(buf) >= spare)
- spare = 0;
- else if (buffer_len(buf)) {
- spare = buffer_contig_space(buf) - res;
- if (spare < 0)
- spare = 0;
- }
- return spare;
-}
-
-
/* Normalizes a pointer which is supposed to be relative to the beginning of a
* buffer, so that wrapping is correctly handled. The intent is to use this
* when increasing a pointer. Note that the wrapping test is only performed
diff --git a/include/proto/channel.h b/include/proto/channel.h
index 36633c6..e323d34 100644
--- a/include/proto/channel.h
+++ b/include/proto/channel.h
@@ -280,14 +280,6 @@
return chn->buf->size - buffer_reserved(chn);
}
-/* Return the amount of bytes that can be written into the buffer at once,
- * excluding reserved space, which is preserved.
- */
-static inline int buffer_contig_space_res(const struct channel *chn)
-{
- return buffer_contig_space_with_res(chn->buf, buffer_reserved(chn));
-}
-
/* Returns the amount of space available at the input of the buffer, taking the
* reserved space into account if ->to_forward indicates that an end of transfer
* is close to happen. The test is optimized to avoid as many operations as