details (avoid 'lint' warnings)

This commit is contained in:
Roberto Ierusalimschy
2015-03-28 16:14:47 -03:00
parent b436ed58a3
commit e723c75c02
7 changed files with 37 additions and 35 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.308 2014/12/08 15:26:55 roberto Exp roberto $
** $Id: lbaselib.c,v 1.309 2014/12/10 12:26:42 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -55,7 +55,7 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) {
return NULL;
do {
int digit = (isdigit((unsigned char)*s)) ? *s - '0'
: toupper((unsigned char)*s) - 'A' + 10;
: (toupper((unsigned char)*s) - 'A') + 10;
if (digit >= base) return NULL; /* invalid numeral */
n = n * base + digit;
s++;