projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d22b568
)
[tests] increase entropy by adding address to current second
author
Paul Brossier
<piem@piem.org>
Wed, 28 Nov 2018 23:28:11 +0000
(
00:28
+0100)
committer
Paul Brossier
<piem@piem.org>
Wed, 28 Nov 2018 23:28:11 +0000
(
00:28
+0100)
tests/utils_tests.h
patch
|
blob
|
history
diff --git
a/tests/utils_tests.h
b/tests/utils_tests.h
index
c2e3c87
..
39bd4ec
100644
(file)
--- a/
tests/utils_tests.h
+++ b/
tests/utils_tests.h
@@
-62,7
+62,8
@@
void utils_init_random (void);
void utils_init_random (void) {
time_t now = time(0);
struct tm *tm_struct = localtime(&now);
- int seed = tm_struct->tm_sec;
+ size_t **tm_address = (void*)&tm_struct;
+ int seed = tm_struct->tm_sec + (size_t)tm_address;
//PRINT_WRN("current seed: %d\n", seed);
srandom (seed);
}