Mesa (master): mesa: Replace random with standard C rand.
Vinson Lee
vlee at kemper.freedesktop.org
Tue Nov 13 06:17:51 UTC 2012
Module: Mesa
Branch: master
Commit: bb284669f85a32900bfec648d68ba4c4300772f4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb284669f85a32900bfec648d68ba4c4300772f4
Author: Vinson Lee <vlee at freedesktop.org>
Date: Mon Nov 12 22:15:42 2012 -0800
mesa: Replace random with standard C rand.
BSD random is not available on some compilers.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
src/mesa/main/hash_table.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/hash_table.c b/src/mesa/main/hash_table.c
index 1e4561e..2bd1929 100644
--- a/src/mesa/main/hash_table.c
+++ b/src/mesa/main/hash_table.c
@@ -363,7 +363,7 @@ _mesa_hash_table_random_entry(struct hash_table *ht,
bool (*predicate)(struct hash_entry *entry))
{
struct hash_entry *entry;
- uint32_t i = random() % ht->size;
+ uint32_t i = rand() % ht->size;
if (ht->entries == 0)
return NULL;
More information about the mesa-commit
mailing list