Skip to content

Commit

Permalink
removed unneeded test (result of b_str2int is already checked
Browse files Browse the repository at this point in the history
against length)
  • Loading branch information
roberto-ieru committed Nov 10, 2014
1 parent 74e10b9 commit b58602d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lbaselib.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.305 2014/10/29 16:11:17 roberto Exp roberto $
** $Id: lbaselib.c,v 1.306 2014/11/02 19:19:04 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
Expand Down Expand Up @@ -61,8 +61,6 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) {
s++;
} while (isalnum((unsigned char)*s));
s += strspn(s, SPACECHARS); /* skip trailing spaces */
if (*s != '\0') /* invalid trailing characters? */
return NULL;
*pn = (lua_Integer)((neg) ? (0u - n) : n);
return s;
}
Expand Down

0 comments on commit b58602d

Please sign in to comment.