aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/crand.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-20 11:41:07 +0100
committerKim Alvefur <zash@zash.se>2017-01-20 11:41:07 +0100
commit7181ae5f4fd54180685d328158dd71af296bfe7e (patch)
treec85d7821ac66d0252434618fa8ad29ed8f170919 /util-src/crand.c
parent4d644d2c03246c3dcb2937475965e7f849a053b4 (diff)
downloadprosody-7181ae5f4fd54180685d328158dd71af296bfe7e.tar.gz
prosody-7181ae5f4fd54180685d328158dd71af296bfe7e.zip
util.crand: Switch to luaL_checkinteger since checkint is deprecated in Lua 5.3
Diffstat (limited to 'util-src/crand.c')
-rw-r--r--util-src/crand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-src/crand.c b/util-src/crand.c
index 177511ce..547ceb55 100644
--- a/util-src/crand.c
+++ b/util-src/crand.c
@@ -57,7 +57,7 @@ int Lrandom(lua_State *L) {
unsigned char *buf;
#endif
int ret = 0;
- size_t len = (size_t)luaL_checkint(L, 1);
+ size_t len = (size_t)luaL_checkinteger(L, 1);
#ifdef BUFLEN
len = len > BUFLEN ? BUFLEN : len;
#else
@@ -71,6 +71,7 @@ int Lrandom(lua_State *L) {
*/
return 2;
}
+
#endif
#if defined(WITH_GETRANDOM)