summaryrefslogtreecommitdiff
path: root/lib/mesa/src/util/tests/hash_table/random_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/util/tests/hash_table/random_entry.c')
-rw-r--r--lib/mesa/src/util/tests/hash_table/random_entry.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/mesa/src/util/tests/hash_table/random_entry.c b/lib/mesa/src/util/tests/hash_table/random_entry.c
index d1bc44aeb..4902a999d 100644
--- a/lib/mesa/src/util/tests/hash_table/random_entry.c
+++ b/lib/mesa/src/util/tests/hash_table/random_entry.c
@@ -24,12 +24,16 @@
* Eric Anholt <eric@anholt.net>
*/
+#undef NDEBUG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "hash_table.h"
+#define SIZE 10000
+
static uint32_t
key_value(const void *key)
{
@@ -53,8 +57,7 @@ main(int argc, char **argv)
{
struct hash_table *ht;
struct hash_entry *entry;
- unsigned size = 10000;
- uint32_t keys[size];
+ uint32_t keys[SIZE];
uint32_t i, random_value;
(void) argc;
@@ -62,7 +65,7 @@ main(int argc, char **argv)
ht = _mesa_hash_table_create(NULL, key_value, uint32_t_key_equals);
- for (i = 0; i < size; i++) {
+ for (i = 0; i < SIZE; i++) {
keys[i] = i;
_mesa_hash_table_insert(ht, keys + i, NULL);