From: antirez Date: Fri, 30 Nov 2012 14:41:09 +0000 (+0100) Subject: redis-benchmark: seed the PRNG with time() at startup. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/b4abbaf755d723d33b0e81880fb035ab88f3544f?hp=395d663d29e6c3fe8fe7c9a3503b96c9bde211f3 redis-benchmark: seed the PRNG with time() at startup. --- diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 8d72573d..7ab700d3 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -510,6 +511,7 @@ int main(int argc, const char **argv) { client c; + srandom(time(NULL)); signal(SIGHUP, SIG_IGN); signal(SIGPIPE, SIG_IGN);