From dfb72918f3fa150c6f6bae95cf2c945d17200fd4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 1 Mar 2017 22:39:01 +0100 Subject: util.crand: Move comment block --- util-src/crand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'util-src') diff --git a/util-src/crand.c b/util-src/crand.c index 8ac89a1f..95362589 100644 --- a/util-src/crand.c +++ b/util-src/crand.c @@ -36,10 +36,6 @@ #error getrandom() requires Linux 3.17 or later #endif -/* - * This acts like a read from /dev/urandom with the exception that it - * *does* block if the entropy pool is not yet initialized. - */ int getrandom(void *buf, size_t len, int flags) { return syscall(SYS_getrandom, buf, len, flags); } @@ -58,6 +54,10 @@ int Lrandom(lua_State *L) { void *buf = lua_newuserdata(L, len); #if defined(WITH_GETRANDOM) + /* + * This acts like a read from /dev/urandom with the exception that it + * *does* block if the entropy pool is not yet initialized. + */ ret = getrandom(buf, len, 0); if(ret < 0) { -- cgit v1.2.3