diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-01 22:39:01 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-01 22:39:01 +0100 |
commit | 52968a85dae573d38ef6060ef03b410a1d19d8bf (patch) | |
tree | ae6006361fa180f6cf6320f27b7614caceddeff0 /util-src/crand.c | |
parent | 2652d5d058ed599775f131fd0b463c74f6178ebf (diff) | |
download | prosody-52968a85dae573d38ef6060ef03b410a1d19d8bf.tar.gz prosody-52968a85dae573d38ef6060ef03b410a1d19d8bf.zip |
util.crand: Move comment block
Diffstat (limited to 'util-src/crand.c')
-rw-r--r-- | util-src/crand.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) { |