Module: Mesa
Branch: master
Commit: d427278a2de4c7f492ed1b7f0d342788ce2bbf4e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d427278a2de4c7f492ed1b7f0d342788ce2bbf4e

Author: Brian Paul <[email protected]>
Date:   Tue Aug 20 08:23:23 2013 -0600

mesa: use ARRAY_SIZE() macro instead of magic number

Reviewed-by: Kenneth Graunke <[email protected]>

---

 src/mesa/main/get.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 09b008a..4f6f59a 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -709,7 +709,7 @@ find_custom_value(struct gl_context *ctx, const struct 
value_desc *d, union valu
    case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
       v->value_int_n.n = 
         _mesa_get_compressed_formats(ctx, v->value_int_n.ints);
-      ASSERT(v->value_int_n.n <= 100);
+      ASSERT(v->value_int_n.n <= ARRAY_SIZE(v->value_int_n.ints));
       break;
 
    case GL_MAX_VARYING_FLOATS_ARB:

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to