aboutsummaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index a0b60e2..b9bc28c 100644
--- a/buffer.c
+++ b/buffer.c
@@ -36,6 +36,10 @@ void buffer_release(Buffer *buf) {
buffer_init(buf);
}
+void buffer_clear(Buffer *buf) {
+ buf->len = 0;
+}
+
bool buffer_put(Buffer *buf, const void *data, size_t len) {
if (!buffer_grow(buf, len))
return false;