mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 16:30:50 +02:00
vulkan/wsi/x11: use ARRAY_SIZE where applicable
Use the handy macro instead of hard coded numbers.
Fixes: c80c08e226 ("vulkan/wsi/x11: Add support for DRI3 v1.2")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
705a6446b4
commit
19ec817756
1 changed files with 2 additions and 2 deletions
|
|
@ -1398,7 +1398,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
|
|||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
for (int i = 0; i < ARRAY_SIZE(modifiers); i++)
|
||||
vk_free(pAllocator, modifiers[i]);
|
||||
*swapchain_out = &chain->base;
|
||||
|
||||
|
|
@ -1409,7 +1409,7 @@ fail_init_images:
|
|||
x11_image_finish(chain, pAllocator, &chain->images[j]);
|
||||
|
||||
fail_register:
|
||||
for (int i = 0; i < 2; i++)
|
||||
for (int i = 0; i < ARRAY_SIZE(modifiers); i++)
|
||||
vk_free(pAllocator, modifiers[i]);
|
||||
|
||||
xcb_unregister_for_special_event(chain->conn, chain->special_event);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue