diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-08-28 16:02:38 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-08-28 16:02:38 +1000 |
commit | a7338c436160e259d0b20058f0a9ae4b442ca102 (patch) | |
tree | bfc887ab328328c72face3d1afc99530a89584ff /src/third_party/wiredtiger/src/support/rand.c | |
parent | f51b43f0fbabe121c18387d8bfbb187a2c6efdee (diff) | |
download | mongo-a7338c436160e259d0b20058f0a9ae4b442ca102.tar.gz |
Import wiredtiger-wiredtiger-2.6.1-633-g0cccab3.tar.gz from wiredtiger branch mongodb-3.2
Diffstat (limited to 'src/third_party/wiredtiger/src/support/rand.c')
-rw-r--r-- | src/third_party/wiredtiger/src/support/rand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/support/rand.c b/src/third_party/wiredtiger/src/support/rand.c index caac04d3529..f5ecb12633e 100644 --- a/src/third_party/wiredtiger/src/support/rand.c +++ b/src/third_party/wiredtiger/src/support/rand.c @@ -84,8 +84,11 @@ __wt_random(WT_RAND_STATE volatile * rnd_state) * to initialize the state, or initializes with a seed that results in a * short period. */ - if (z == 0 || w == 0) - __wt_random_init(rnd_state); + if (z == 0 || w == 0) { + __wt_random_init(&rnd); + w = M_W(rnd); + z = M_Z(rnd); + } M_Z(rnd) = z = 36969 * (z & 65535) + (z >> 16); M_W(rnd) = w = 18000 * (w & 65535) + (w >> 16); |