From bca122902a8511c32b5fb0b8ebbdf7bce002a82b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 24 Nov 2017 10:49:25 +0000 Subject: [PATCH] st/dri: replace hard-coded array size with ARRAY_SIZE() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Reviewed-by: Marek Olšák --- src/gallium/state_trackers/dri/dri_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 91f50fe8e32..31b2c37bfd0 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -219,7 +219,7 @@ dri_fill_in_modes(struct dri_screen *screen) if (dri_loader_get_cap(screen, DRI_LOADER_CAP_RGBA_ORDERING)) num_formats = ARRAY_SIZE(mesa_formats); else - num_formats = 5; + num_formats = ARRAY_SIZE(mesa_formats) - 2; /* Add configs. */ for (format = 0; format < num_formats; format++) { -- 2.30.2