From d129ae8c34e8048ee4b26dd9af0f14069593357a Mon Sep 17 00:00:00 2001 From: des Date: Wed, 6 Feb 2008 11:39:55 +0000 Subject: Add necessary cast for tolower() argument. Submitted by: Joerg Sonnenberger MFC after: 1 week --- lib/libfetch/http.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libfetch') diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index 2ee76e2..a5499c6 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -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); -- cgit v1.1