Commit 9e28ef9fa20c4525cb3986770dd0ebded8cb044c

Daniel Mendler 2019-05-08T15:14:50

mp_rand: use #else after arcrandom

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;