aboutsummaryrefslogtreecommitdiff
path: root/contrib/lua/src/loslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/lua/src/loslib.c')
-rw-r--r--contrib/lua/src/loslib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/lua/src/loslib.c b/contrib/lua/src/loslib.c
index 5a94eb9068d5..de590c6b717a 100644
--- a/contrib/lua/src/loslib.c
+++ b/contrib/lua/src/loslib.c
@@ -1,5 +1,5 @@
/*
-** $Id: loslib.c,v 1.65 2016/07/18 17:58:58 roberto Exp $
+** $Id: loslib.c,v 1.65.1.1 2017/04/19 17:29:57 roberto Exp $
** Standard Operating System library
** See Copyright Notice in lua.h
*/
@@ -293,7 +293,8 @@ static int os_date (lua_State *L) {
else
stm = l_localtime(&t, &tmr);
if (stm == NULL) /* invalid date? */
- luaL_error(L, "time result cannot be represented in this installation");
+ return luaL_error(L,
+ "time result cannot be represented in this installation");
if (strcmp(s, "*t") == 0) {
lua_createtable(L, 0, 9); /* 9 = number of fields */
setallfields(L, stm);
@@ -340,7 +341,8 @@ static int os_time (lua_State *L) {
setallfields(L, &ts); /* update fields with normalized values */
}
if (t != (time_t)(l_timet)t || t == (time_t)(-1))
- luaL_error(L, "time result cannot be represented in this installation");
+ return luaL_error(L,
+ "time result cannot be represented in this installation");
l_pushtime(L, t);
return 1;
}