commit c5da4f4cd067a2efa2a8f0f14f3034ed0b635f4d
parent 7bcb2462e414dbf4318edf376852fc97d6e45b33
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 30 Nov 2011 11:03:00 -0200
unused variable removed
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lbaselib.c b/lbaselib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbaselib.c,v 1.271 2011/11/29 15:55:08 roberto Exp roberto $
+** $Id: lbaselib.c,v 1.272 2011/11/30 12:42:21 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -288,7 +288,6 @@ static int luaB_loadfile (lua_State *L) {
** reserved slot inside the stack.
*/
static const char *generic_reader (lua_State *L, void *ud, size_t *size) {
- const char *s;
(void)(ud); /* not used */
luaL_checkstack(L, 2, "too many nested functions");
lua_pushvalue(L, 1); /* get function */
@@ -297,7 +296,7 @@ static const char *generic_reader (lua_State *L, void *ud, size_t *size) {
*size = 0;
return NULL;
}
- else if ((s = lua_tostring(L, -1)) == NULL)
+ else if (!lua_isstring(L, -1))
luaL_error(L, "reader function must return a string");
lua_replace(L, RESERVEDSLOT); /* save string in reserved slot */
return lua_tolstring(L, RESERVEDSLOT, size);