Changeset

7932:6c5e4f24b51e

util.crand: Move comment block
author Kim Alvefur <zash@zash.se>
date Wed, 01 Mar 2017 22:39:01 +0100
parents 7931:b619b85e01aa
children 7933:c91ec7689424
files util-src/crand.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/crand.c	Wed Mar 01 22:27:11 2017 +0100
+++ b/util-src/crand.c	Wed Mar 01 22:39:01 2017 +0100
@@ -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 @@
 	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) {