diff --git a/gnu/usr.bin/tar/gnu.c b/gnu/usr.bin/tar/gnu.c index ef51f2b5fedd..d3a04463082e 100644 --- a/gnu/usr.bin/tar/gnu.c +++ b/gnu/usr.bin/tar/gnu.c @@ -146,12 +146,12 @@ read_dir_file () strp[-1] = '\0'; strp = buf; dev = atol (strp); - while (isdigit (*strp)) + while (isdigit ((unsigned char) *strp)) strp++; ino = atol (strp); - while (isspace (*strp)) + while (isspace ((unsigned char) *strp)) strp++; - while (isdigit (*strp)) + while (isdigit ((unsigned char) *strp)) strp++; strp++; add_dir (un_quote_string (strp), dev, ino, (char *) 0); diff --git a/gnu/usr.bin/tar/list.c b/gnu/usr.bin/tar/list.c index 28e6ab316f1f..79d2654e3ade 100644 --- a/gnu/usr.bin/tar/list.c +++ b/gnu/usr.bin/tar/list.c @@ -513,7 +513,7 @@ from_oct (digs, where) { register long value; - while (isspace (*where)) + while (isspace ((unsigned char) *where)) { /* Skip spaces */ where++; if (--digs <= 0) @@ -526,7 +526,7 @@ from_oct (digs, where) --digs; } - if (digs > 0 && *where && !isspace (*where)) + if (digs > 0 && *where && !isspace ((unsigned char) *where)) return -1; /* Ended on non-space/nul */ return value;