From 9e28ef9fa20c4525cb3986770dd0ebded8cb044c Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Wed, 8 May 2019 15:14:50 +0200 Subject: [PATCH] mp_rand: use #else after arcrandom --- bn_mp_rand.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bn_mp_rand.c b/bn_mp_rand.c index bdcc0cf..6eae93c 100644 --- a/bn_mp_rand.c +++ b/bn_mp_rand.c @@ -130,35 +130,35 @@ static int s_read_ltm_rng(void *p, size_t n) static int s_mp_rand_source_platform(void *p, size_t n) { - int ret = MP_ERR; - #if defined(MP_ARC4RANDOM) arc4random_buf(p, n); return MP_OKAY; -#endif +#else + + int ret = MP_ERR; #if defined(MP_WIN_CSP) ret = s_read_win_csp(p, n); if (ret == MP_OKAY) return ret; -#else +#endif #if defined(MP_GETRANDOM) ret = s_read_getrandom(p, n); if (ret == MP_OKAY) return ret; #endif + #if defined(MP_DEV_URANDOM) ret = s_read_dev_urandom(p, n); if (ret == MP_OKAY) return ret; #endif -#endif /* MP_WIN_CSP */ - #if defined(MP_PRNG_ENABLE_LTM_RNG) ret = s_read_ltm_rng(p, n); if (ret == MP_OKAY) return ret; #endif return ret; +#endif } static int (*s_rand_source)(void *, size_t) = s_mp_rand_source_platform;