zink: fix returning _Bool instead of pointer

When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
src/gallium/drivers/zink/zink_instance.c: In function ‘zink_create_instance’:
src/gallium/drivers/zink/zink_instance.c:37:14: error: incompatible types when returning type ‘_Bool’ but ‘VkInstance’ {aka ‘struct VkInstance_T *’} was expected
   37 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
This commit is contained in:
Antonio Ospite
2025-07-23 09:51:22 +02:00
committed by Marge Bot
parent 51a5926f66
commit 6e2de27288
+1 -1
View File
@@ -154,7 +154,7 @@ zink_create_instance(struct zink_screen *screen, struct zink_instance_info *inst
GET_PROC_ADDR_INSTANCE_LOCAL(screen, NULL, EnumerateInstanceLayerProperties);
if (!vk_EnumerateInstanceExtensionProperties ||
!vk_EnumerateInstanceLayerProperties)
return false;
return NULL;
// Build up the extensions from the reported ones but only for the unnamed layer
uint32_t extension_count = 0;