lima: 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/lima/lima_bo.c: In function ‘lima_bo_cache_get’:
../src/gallium/drivers/lima/lima_bo.c:247:14: error: incompatible types when returning type ‘_Bool’ but ‘struct lima_bo *’ was expected
  247 |       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-24 14:58:33 +02:00 committed by Marge Bot
parent b2b6e56583
commit 9c96f4f13f

View file

@ -244,7 +244,7 @@ lima_bo_cache_get(struct lima_screen *screen, uint32_t size, uint32_t flags)
if (!bucket) {
mtx_unlock(&screen->bo_cache_lock);
return false;
return NULL;
}
list_for_each_entry_safe(struct lima_bo, entry, bucket, size_list) {