aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/pposix.c
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-08 09:28:42 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-08 09:28:42 +0200
commitc1be2da977adcd6887bb893c8d60a2886c199e07 (patch)
treefad810d351685ce887f28281bb6fa5d500ddee4c /util-src/pposix.c
parent1a23a874bcb503f8e482b4c46f0796d3cfdcfccd (diff)
downloadprosody-c1be2da977adcd6887bb893c8d60a2886c199e07.tar.gz
prosody-c1be2da977adcd6887bb893c8d60a2886c199e07.zip
pposix: Generate an error when a passed string isn’t "unlimited".
Diffstat (limited to 'util-src/pposix.c')
-rw-r--r--util-src/pposix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index 435af6f0..f9a60600 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -552,6 +552,7 @@ rlim_t arg_to_rlimit(lua_State *L, int idx, rlim_t current) {
if(strcmp(lua_tostring(L, idx), "unlimited") == 0) {
return RLIM_INFINITY;
}
+ return luaL_argerror(L, idx, "unexpected type");
case LUA_TNUMBER:
return lua_tointeger(L, idx);