Software /
code /
prosody
Comparison
util-src/crand.c @ 8446:a72898dde1a0
util.crand: Remove unneeded cast
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 03 Dec 2017 14:14:35 +0100 |
parent | 8445:2d3a3d12ec87 |
child | 8447:200f4f1b7833 |
comparison
equal
deleted
inserted
replaced
8445:2d3a3d12ec87 | 8446:a72898dde1a0 |
---|---|
57 #elif ! defined(WITH_ARC4RANDOM) | 57 #elif ! defined(WITH_ARC4RANDOM) |
58 #error util.crand compiled without a random source | 58 #error util.crand compiled without a random source |
59 #endif | 59 #endif |
60 | 60 |
61 int Lrandom(lua_State *L) { | 61 int Lrandom(lua_State *L) { |
62 const size_t len = (size_t)luaL_checkinteger(L, 1); | 62 const size_t len = luaL_checkinteger(L, 1); |
63 void *buf = lua_newuserdata(L, len); | 63 void *buf = lua_newuserdata(L, len); |
64 | 64 |
65 #if defined(WITH_GETRANDOM) | 65 #if defined(WITH_GETRANDOM) |
66 /* | 66 /* |
67 * This acts like a read from /dev/urandom with the exception that it | 67 * This acts like a read from /dev/urandom with the exception that it |