Add necessary cast for tolower() argument.

Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after:	1 week
This commit is contained in:
Dag-Erling Smørgrav 2008-02-06 11:39:55 +00:00
parent 2c41053e78
commit 79257dd70a

View File

@ -150,7 +150,7 @@ http_new_chunk(struct httpio *io)
*p - '0';
} else {
io->chunksize = io->chunksize * 16 +
10 + tolower(*p) - 'a';
10 + tolower((unsigned char)*p) - 'a';
}
}
@ -434,7 +434,8 @@ http_get_reply(conn_t *conn)
static const char *
http_match(const char *str, const char *hdr)
{
while (*str && *hdr && tolower(*str++) == tolower(*hdr++))
while (*str && *hdr &&
tolower((unsigned char)*str++) == tolower((unsigned char)*hdr++))
/* nothing */;
if (*str || *hdr != ':')
return (NULL);