st/wgl: use ARRAY_SIZE() macro in wglChoosePixelFormatARB()
authorBrian Paul <brianp@vmware.com>
Sat, 29 Apr 2017 03:32:05 +0000 (21:32 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 29 Apr 2017 03:37:07 +0000 (21:37 -0600)
Trivial.

src/gallium/state_trackers/wgl/stw_ext_pixelformat.c

index 4a64c4607c348f259d1f722829f8cfc66fbf331b..6281d5d241d7d25f7bd4a5014bebe41729db417a 100644 (file)
@@ -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;