Unverified Commit 47637bea authored by RemRain's avatar RemRain Committed by GitHub
Browse files

Set the initial seed for random() (#5679)

parent 2530dc0e
...@@ -5135,6 +5135,7 @@ int main(int argc, char **argv) { ...@@ -5135,6 +5135,7 @@ int main(int argc, char **argv) {
tzset(); /* Populates 'timezone' global. */ tzset(); /* Populates 'timezone' global. */
zmalloc_set_oom_handler(redisOutOfMemoryHandler); zmalloc_set_oom_handler(redisOutOfMemoryHandler);
srand(time(NULL)^getpid()); srand(time(NULL)^getpid());
srandom(time(NULL)^getpid());
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
crc64_init(); crc64_init();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment