mp_rand: use #else after arcrandom
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
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;