From 8201cd9f40897cf6b8e6973b28a8661108702ab1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 24 Feb 2019 20:53:16 +0100 Subject: Remove unused allocator from buffer --- src/buffer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/buffer.c b/src/buffer.c index d5e6d97..a097cbf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4,13 +4,12 @@ #include "../include/scoped_allocator.h" #include -int buffer_init(Buffer *self, ScopedAllocator *allocator) { +int buffer_init(Buffer *self, struct ScopedAllocator *allocator) { self->data = NULL; self->size = 0; self->capacity = 0; - self->allocator = allocator; - if(self->allocator) - return scoped_allocator_add_buffer(self->allocator, self); + if(allocator) + return scoped_allocator_add_buffer(allocator, self); return 0; } -- cgit v1.2.3