aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-01-04 22:24:06 +0100
committerSimon Ser <contact@emersion.fr>2024-01-04 22:24:06 +0100
commita0b1329ee6cce22aca0c9b064fe9c136cc05d630 (patch)
tree31aefab2c803d29e4e3c2da09d20dde4812f3104 /render
parent2f2a55ebd3c5a950f1bf8c280edf0838721363da (diff)
Fix bool return types
This makes wlroots build in C23 mode. C23 is more strict and rejects implicit conversions from bool to a pointer.
Diffstat (limited to 'render')
-rw-r--r--render/vulkan/renderer.c4
-rw-r--r--render/vulkan/texture.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index d15ccc2d..05486a0f 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -1816,12 +1816,12 @@ struct wlr_vk_pipeline_layout *get_or_create_pipeline_layout(
if (res != VK_SUCCESS) {
wlr_vk_error("vkCreateSampler", res);
free(pipeline_layout);
- return false;
+ return NULL;
}
if (!init_tex_layouts(renderer, pipeline_layout->sampler, &pipeline_layout->ds, &pipeline_layout->vk)) {
free(pipeline_layout);
- return false;
+ return NULL;
}
wl_list_insert(&renderer->pipeline_layouts, &pipeline_layout->link);
diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c
index 4b9674cf..61c14626 100644
--- a/render/vulkan/texture.c
+++ b/render/vulkan/texture.c
@@ -806,7 +806,7 @@ static struct wlr_texture *vulkan_texture_from_dmabuf_buffer(
struct wlr_vk_texture *texture = vulkan_texture_from_dmabuf(renderer, dmabuf);
if (texture == NULL) {
- return false;
+ return NULL;
}
texture->buffer = wlr_buffer_lock(buffer);