1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-10 15:36:33 +00:00

Updated uses of the ctype function to support explict casting of the arguments

to (int)(unsigned char).
This commit is contained in:
josh
2009-08-06 15:10:00 +00:00
parent 990db60861
commit df71e36084
14 changed files with 73 additions and 72 deletions

View File

@@ -156,18 +156,18 @@ static void mac_prefix_init() {
while(fgets(line, sizeof(line), fp)) {
lineno++;
if (*line == '#') continue;
if (!isxdigit(*line)) {
if (!isxdigit((int) (unsigned char) *line)) {
error("Parse error one line #%d of %s. Giving up parsing.", lineno, filename);
break;
}
/* First grab the prefix */
pfx = strtol(line, &endptr, 16);
if (!endptr || !isspace(*endptr)) {
if (!endptr || !isspace((int) (unsigned char) *endptr)) {
error("Parse error one line #%d of %s. Giving up parsing.", lineno, filename);
break;
}
/* Now grab the vendor */
while(*endptr && isspace(*endptr)) endptr++;
while(*endptr && isspace((int) (unsigned char) *endptr)) endptr++;
assert(*endptr);
p = endptr;
while(*endptr && *endptr != '\n' && *endptr != '\r') endptr++;