ref: cb288f22455e0f93de1e5f132d2f39d1916f0204
parent: d22b568d6c15d77251d18cfd5e4700e4750ca2f5
author: Paul Brossier <piem@piem.org>
date: Wed Nov 28 19:28:11 EST 2018
[tests] increase entropy by adding address to current second
--- a/tests/utils_tests.h
+++ b/tests/utils_tests.h
@@ -62,7 +62,8 @@
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);
}