diff options
Diffstat (limited to '')
-rw-r--r-- | src/util/fifo_buffer.c (renamed from src/fifo_buffer.c) | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fifo_buffer.c b/src/util/fifo_buffer.c index 915fb0579..162ddf946 100644 --- a/src/fifo_buffer.c +++ b/src/util/fifo_buffer.c @@ -58,6 +58,14 @@ fifo_buffer_new(size_t size) return buffer; } +void +fifo_buffer_init(struct fifo_buffer *buffer, size_t size) +{ + buffer->size = size - (sizeof(*buffer) - sizeof(buffer->buffer)); + buffer->start = 0; + buffer->end = 0; +} + static void fifo_buffer_move(struct fifo_buffer *buffer); |