From 4060cd7d59f46c99501a31c52ecbea5a65df3071 Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Mon, 2 Feb 2026 15:56:34 +0200 Subject: [PATCH] kdrive/fbdev: Use `ARRAY_SIZE` from `dix.h` Signed-off-by: stefan11111 --- hw/kdrive/fbdev/fb_glamor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/kdrive/fbdev/fb_glamor.c b/hw/kdrive/fbdev/fb_glamor.c index 8c8bf9cd0b..d1bfcd04ef 100644 --- a/hw/kdrive/fbdev/fb_glamor.c +++ b/hw/kdrive/fbdev/fb_glamor.c @@ -8,6 +8,7 @@ #include #include +#include "dix.h" #include "scrnintstr.h" #include "glamor_priv.h" #include "glamor_egl.h" @@ -28,8 +29,6 @@ bool fbGlamorAllowed = TRUE; bool fbForceGlamor = FALSE; bool fbXVAllowed = TRUE; -#define ARR_SIZE(x) (sizeof(x) / sizeof(*(x))) - static void fbdev_glamor_egl_cleanup(FbdevScrPriv *scrpriv) { @@ -504,7 +503,7 @@ fbdev_glamor_egl_try_big_gl_api(FbdevScrPriv *scrpriv) scrpriv->ctx = fbdev_glamor_egl_create_context(scrpriv->display, config_attrib_list, ctx_attrib_lists, - ARR_SIZE(ctx_attrib_lists)); + ARRAY_SIZE(ctx_attrib_lists)); if (scrpriv->ctx == EGL_NO_CONTEXT) { return FALSE; @@ -552,7 +551,7 @@ fbdev_glamor_egl_try_gles_api(FbdevScrPriv *scrpriv) scrpriv->ctx = fbdev_glamor_egl_create_context(scrpriv->display, config_attrib_list, ctx_attrib_lists, - ARR_SIZE(ctx_attrib_lists)); + ARRAY_SIZE(ctx_attrib_lists)); if (scrpriv->ctx == EGL_NO_CONTEXT) { return FALSE;