Avoid passing negative values to isspace() on machines with signed chars.
This commit is contained in:
parent
c63c3a56b8
commit
74042ab74b
@ -269,7 +269,7 @@ input(FILE *fp)
|
|||||||
NULL)
|
NULL)
|
||||||
err(1, (char *)NULL);
|
err(1, (char *)NULL);
|
||||||
while (fgets(buf, MAXLINELEN, fp)) {
|
while (fgets(buf, MAXLINELEN, fp)) {
|
||||||
for (p = buf; *p && isspace(*p); ++p);
|
for (p = buf; *p && isspace((unsigned char)*p); ++p);
|
||||||
if (!*p)
|
if (!*p)
|
||||||
continue;
|
continue;
|
||||||
if (!(p = strchr(p, '\n'))) {
|
if (!(p = strchr(p, '\n'))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user