From a0b1329ee6cce22aca0c9b064fe9c136cc05d630 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 4 Jan 2024 22:24:06 +0100 Subject: Fix bool return types This makes wlroots build in C23 mode. C23 is more strict and rejects implicit conversions from bool to a pointer. --- render/vulkan/renderer.c | 4 ++-- render/vulkan/texture.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'render') 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); -- cgit v1.2.3