diff --git a/src/polypcore/random.c b/src/polypcore/random.c index fe75a614f..1221206fd 100644 --- a/src/polypcore/random.c +++ b/src/polypcore/random.c @@ -41,9 +41,8 @@ static int has_whined = 0; static const char *devices[] = { "/dev/urandom", "/dev/random", NULL }; static int random_proper(void *ret_data, size_t length) { - assert(ret_data && length); - #ifdef OS_IS_WIN32 + assert(ret_data && length); return -1; @@ -53,6 +52,8 @@ static int random_proper(void *ret_data, size_t length) { ssize_t r = 0; const char **device; + assert(ret_data && length); + device = devices; while (*device) {