Mesa (master): mesa: use ARRAY_SIZE in _mesa_QueryMatrixxOES()
Brian Paul
brianp at kemper.freedesktop.org
Thu Mar 12 14:15:26 UTC 2015
Module: Mesa
Branch: master
Commit: 6ca5eaf49ce184009571f58fb94865cf788e8907
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ca5eaf49ce184009571f58fb94865cf788e8907
Author: Brian Paul <brianp at vmware.com>
Date: Sat Mar 7 13:15:22 2015 -0700
mesa: use ARRAY_SIZE in _mesa_QueryMatrixxOES()
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/mesa/main/querymatrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/querymatrix.c b/src/mesa/main/querymatrix.c
index ccd5c5e..18361c9 100644
--- a/src/mesa/main/querymatrix.c
+++ b/src/mesa/main/querymatrix.c
@@ -75,7 +75,7 @@ _mesa_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16])
* we can return immediately, as _mesa_GetInteger() will have
* logged the necessary error already.
*/
- for (i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(modes); i++) {
if (modes[i].currentMode == currentMode) {
desiredMatrix = modes[i].desiredMatrix;
break;
More information about the mesa-commit
mailing list