From ff0db1dfb9941fac2087191cc32446eb39ab16e1 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Mon, 28 Apr 2014 23:49:31 +0100 Subject: [PATCH] modified : rand generator --- programs/fuzzer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/programs/fuzzer.c b/programs/fuzzer.c index 55b3bb5..9b17209 100644 --- a/programs/fuzzer.c +++ b/programs/fuzzer.c @@ -105,10 +105,15 @@ static int FUZ_GetMilliSpan( int nTimeStart ) } +# define FUZ_rotl32(x,r) ((x << r) | (x >> (32 - r))) unsigned int FUZ_rand(unsigned int* src) { - *src = XXH32(&src, sizeof(src), 0); - return *src; + U32 rand32 = *src; + rand32 *= PRIME1; + rand32 += PRIME2; + rand32 = FUZ_rotl32(rand32, 13); + *src = rand32; + return rand32; } -- 2.7.4