aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-02-24 20:53:16 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit8201cd9f40897cf6b8e6973b28a8661108702ab1 (patch)
tree843a1dd452c558c6d9b8c72c65f94ee31a78ea0e /src
parent6ff281bf14c6be02f1ff681a7c63607b06f1c1d3 (diff)
Remove unused allocator from buffer
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c7
1 files changed, 3 insertions, 4 deletions
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 <assert.h>
-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;
}