From d06045dfdd7c93fad4808f98a27ccf15112a10bb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 28 Apr 2017 21:32:05 -0600 Subject: [PATCH] st/wgl: use ARRAY_SIZE() macro in wglChoosePixelFormatARB() Trivial. --- src/gallium/state_trackers/wgl/stw_ext_pixelformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c b/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c index 4a64c4607c3..6281d5d241d 100644 --- a/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c +++ b/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c @@ -342,7 +342,7 @@ score_pixelformats(struct stw_pixelformat_score *scores, /* Find out if a given attribute should be considered for score calculation. */ - for (i = 0; i < sizeof(attrib_match) / sizeof(attrib_match[0]); i++) { + for (i = 0; i < ARRAY_SIZE(attrib_match); i++) { if (attrib_match[i].attribute == attribute) { ami = &attrib_match[i]; break; -- 2.30.2