aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-30 11:03:24 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-30 11:03:24 -0200
commitc5da4f4cd067a2efa2a8f0f14f3034ed0b635f4d (patch)
treeed69dd8bec20d494abacbb49faaea7640f4f2d14
parent7bcb2462e414dbf4318edf376852fc97d6e45b33 (diff)
downloadlua-c5da4f4cd067a2efa2a8f0f14f3034ed0b635f4d.tar.gz
lua-c5da4f4cd067a2efa2a8f0f14f3034ed0b635f4d.tar.bz2
lua-c5da4f4cd067a2efa2a8f0f14f3034ed0b635f4d.zip
unused variable removed
-rw-r--r--lbaselib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index ce868ef7..35043c5b 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.271 2011/11/29 15:55:08 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.272 2011/11/30 12:42:21 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*/
@@ -288,7 +288,6 @@ static int luaB_loadfile (lua_State *L) {
288** reserved slot inside the stack. 288** reserved slot inside the stack.
289*/ 289*/
290static const char *generic_reader (lua_State *L, void *ud, size_t *size) { 290static const char *generic_reader (lua_State *L, void *ud, size_t *size) {
291 const char *s;
292 (void)(ud); /* not used */ 291 (void)(ud); /* not used */
293 luaL_checkstack(L, 2, "too many nested functions"); 292 luaL_checkstack(L, 2, "too many nested functions");
294 lua_pushvalue(L, 1); /* get function */ 293 lua_pushvalue(L, 1); /* get function */
@@ -297,7 +296,7 @@ static const char *generic_reader (lua_State *L, void *ud, size_t *size) {
297 *size = 0; 296 *size = 0;
298 return NULL; 297 return NULL;
299 } 298 }
300 else if ((s = lua_tostring(L, -1)) == NULL) 299 else if (!lua_isstring(L, -1))
301 luaL_error(L, "reader function must return a string"); 300 luaL_error(L, "reader function must return a string");
302 lua_replace(L, RESERVEDSLOT); /* save string in reserved slot */ 301 lua_replace(L, RESERVEDSLOT); /* save string in reserved slot */
303 return lua_tolstring(L, RESERVEDSLOT, size); 302 return lua_tolstring(L, RESERVEDSLOT, size);