aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-10 12:25:52 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-10 12:25:52 -0200
commitb58602d93dbbe92373bc451916b256cb2c9a4730 (patch)
treeaa4546b1060d1ff91c48477f183f937fd2986784
parent74e10b9c3b7bdc5dd1b2fe61149b6244f3d95a03 (diff)
downloadlua-b58602d93dbbe92373bc451916b256cb2c9a4730.tar.gz
lua-b58602d93dbbe92373bc451916b256cb2c9a4730.tar.bz2
lua-b58602d93dbbe92373bc451916b256cb2c9a4730.zip
removed unneeded test (result of b_str2int is already checked
against length)
-rw-r--r--lbaselib.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index fd71a9fc..5c73e4f8 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.305 2014/10/29 16:11:17 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.306 2014/11/02 19:19:04 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*/
@@ -61,8 +61,6 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) {
61 s++; 61 s++;
62 } while (isalnum((unsigned char)*s)); 62 } while (isalnum((unsigned char)*s));
63 s += strspn(s, SPACECHARS); /* skip trailing spaces */ 63 s += strspn(s, SPACECHARS); /* skip trailing spaces */
64 if (*s != '\0') /* invalid trailing characters? */
65 return NULL;
66 *pn = (lua_Integer)((neg) ? (0u - n) : n); 64 *pn = (lua_Integer)((neg) ? (0u - n) : n);
67 return s; 65 return s;
68} 66}