projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b67460
)
mesa: Replace random with standard C rand.
author
Vinson Lee
<vlee@freedesktop.org>
Tue, 13 Nov 2012 06:15:42 +0000
(22:15 -0800)
committer
Vinson Lee
<vlee@freedesktop.org>
Tue, 13 Nov 2012 06:15:42 +0000
(22:15 -0800)
BSD random is not available on some compilers.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
src/mesa/main/hash_table.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/hash_table.c
b/src/mesa/main/hash_table.c
index 1e4561e6caf5985f9c2e473c300ef0602fd1577a..2bd1929aa9dd3b36462a1d53fda45fb14c3b440d 100644
(file)
--- 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 = rand
om
() % ht->size;
+ uint32_t i = rand() % ht->size;
if (ht->entries == 0)
return NULL;