From a8c91fbac9cad234fc074a9a7fea30bb7fb14489 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 21 Apr 2021 21:29:33 -0400 Subject: render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocator --- render/shm_allocator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/shm_allocator.c b/render/shm_allocator.c index 8da7bea6..16d0e5c9 100644 --- a/render/shm_allocator.c +++ b/render/shm_allocator.c @@ -98,12 +98,13 @@ static const struct wlr_allocator_interface allocator_impl = { .create_buffer = allocator_create_buffer, }; -struct wlr_shm_allocator *wlr_shm_allocator_create(void) { +struct wlr_allocator *wlr_shm_allocator_create(void) { struct wlr_shm_allocator *allocator = calloc(1, sizeof(*allocator)); if (allocator == NULL) { return NULL; } wlr_allocator_init(&allocator->base, &allocator_impl); - return allocator; + wlr_log(WLR_DEBUG, "Created shm allocator"); + return &allocator->base; } -- cgit v1.2.3