mesa: use ARRAY_SIZE() macro instead of magic number
authorBrian Paul <brianp@vmware.com>
Tue, 20 Aug 2013 14:23:23 +0000 (08:23 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Aug 2013 19:14:25 +0000 (13:14 -0600)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/get.c

index 09b008a072e5cdcd7a3758e34af6a59b8d15fe27..4f6f59ae6bb83caad7b09e9c5170c1fee47de205 100644 (file)
@@ -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: