From f50f26325f8df7e076a0ffd2196eab1c36ff07ae Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sun, 13 Oct 2019 08:52:59 +0100 Subject: [PATCH] util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* uint64_t Signed-off-by: Eric Engestrom Reviewed-by: Emmanuel Gil Peyrot Part-of: --- src/util/rand_xor.c | 4 ++-- src/util/rand_xor.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c index 31612d57660..b34b4e40bfa 100644 --- a/src/util/rand_xor.c +++ b/src/util/rand_xor.c @@ -41,7 +41,7 @@ * to the public domain. */ uint64_t -rand_xorshift128plus(uint64_t *seed) +rand_xorshift128plus(uint64_t seed[2]) { uint64_t *s = seed; @@ -55,7 +55,7 @@ rand_xorshift128plus(uint64_t *seed) } void -s_rand_xorshift128plus(uint64_t *seed, bool randomised_seed) +s_rand_xorshift128plus(uint64_t seed[2], bool randomised_seed) { if (!randomised_seed) goto fixed_seed; diff --git a/src/util/rand_xor.h b/src/util/rand_xor.h index 532d549bcda..b55598f228a 100644 --- a/src/util/rand_xor.h +++ b/src/util/rand_xor.h @@ -29,9 +29,9 @@ #include uint64_t -rand_xorshift128plus(uint64_t *seed); +rand_xorshift128plus(uint64_t seed[2]); void -s_rand_xorshift128plus(uint64_t *seed, bool randomised_seed); +s_rand_xorshift128plus(uint64_t seed[2], bool randomised_seed); #endif /* RAND_XOR_H */ -- 2.30.2