Skip a useless test on non-emscripten platforms

This commit is contained in:
Frank Denis 2015-11-01 12:45:58 +01:00
parent 2d04b79f5c
commit f5caa454b7

View File

@ -107,9 +107,15 @@ randombytes_uniform(const uint32_t upper_bound)
uint32_t min; uint32_t min;
uint32_t r; uint32_t r;
#ifdef __EMSCRIPTEN__
if (implementation != NULL && implementation->uniform != NULL) { if (implementation != NULL && implementation->uniform != NULL) {
return implementation->uniform(upper_bound); return implementation->uniform(upper_bound);
} }
#else
if (implementation->uniform != NULL) {
return implementation->uniform(upper_bound);
}
#endif
if (upper_bound < 2) { if (upper_bound < 2) {
return 0; return 0;
} }