aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-02-21 10:44:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-02-21 10:44:53 -0300
commita83ed55f1e3e20f73d01489c18889bb8554593ce (patch)
tree816177a00ce20b36503b6a48bb7d1956c0432859 /lbaselib.c
parentb559aed2d38c6eafcc624da8599b6ac52e11f17c (diff)
downloadlua-a83ed55f1e3e20f73d01489c18889bb8554593ce.tar.gz
lua-a83ed55f1e3e20f73d01489c18889bb8554593ce.tar.bz2
lua-a83ed55f1e3e20f73d01489c18889bb8554593ce.zip
added 'return' (when possible) to calls to error functions
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 4536d617..76d85cad 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.274 2012/04/27 14:13:19 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.275 2012/12/03 20:18:02 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -336,7 +336,8 @@ static int dofilecont (lua_State *L) {
336static int luaB_dofile (lua_State *L) { 336static int luaB_dofile (lua_State *L) {
337 const char *fname = luaL_optstring(L, 1, NULL); 337 const char *fname = luaL_optstring(L, 1, NULL);
338 lua_settop(L, 1); 338 lua_settop(L, 1);
339 if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L); 339 if (luaL_loadfile(L, fname) != LUA_OK)
340 return lua_error(L);
340 lua_callk(L, 0, LUA_MULTRET, 0, dofilecont); 341 lua_callk(L, 0, LUA_MULTRET, 0, dofilecont);
341 return dofilecont(L); 342 return dofilecont(L);
342} 343}