X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/7d3ee4172f52bf94185960799c1d12c16ed96ff7..4b1f6ad3e7a5c7c28618e43e7539c9a937bf8521:/src/memtest.c diff --git a/src/memtest.c b/src/memtest.c index 09b4d831..88c7213a 100644 --- a/src/memtest.c +++ b/src/memtest.c @@ -132,13 +132,13 @@ void memtest_fill_value(unsigned long *l, size_t bytes, unsigned long v1, v = (off & 1) ? v2 : v1; for (w = 0; w < iwords; w++) { #ifdef MEMTEST_32BIT - *l1 = *l2 = ((unsigned long) (rand()&0xffff)) | - (((unsigned long) (rand()&0xffff)) << 16); + *l1 = *l2 = ((unsigned long) v) | + (((unsigned long) v) << 16); #else - *l1 = *l2 = ((unsigned long) (rand()&0xffff)) | - (((unsigned long) (rand()&0xffff)) << 16) | - (((unsigned long) (rand()&0xffff)) << 32) | - (((unsigned long) (rand()&0xffff)) << 48); + *l1 = *l2 = ((unsigned long) v) | + (((unsigned long) v) << 16) | + (((unsigned long) v) << 32) | + (((unsigned long) v) << 48); #endif l1 += step; l2 += step;