mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
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:
parent
b2b6e56583
commit
9c96f4f13f
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue