diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-04-21 21:29:33 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-28 20:55:57 +0200 |
commit | a8c91fbac9cad234fc074a9a7fea30bb7fb14489 (patch) | |
tree | 12041fe1fb8cad7520e3466a8ef0d1de3cca7f1d /render/shm_allocator.c | |
parent | c75aa71816826907805606a108626b4671120a7e (diff) |
render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocator
Diffstat (limited to 'render/shm_allocator.c')
-rw-r--r-- | render/shm_allocator.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |