From: Eric Engestrom Date: Fri, 24 Nov 2017 10:49:25 +0000 (+0000) Subject: st/dri: replace hard-coded array size with ARRAY_SIZE() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bca122902a8511c32b5fb0b8ebbdf7bce002a82b;p=mesa.git st/dri: replace hard-coded array size with ARRAY_SIZE() Signed-off-by: Eric Engestrom Reviewed-by: Marek Olšák --- 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++) {