From: Ulrich Habel Date: Wed, 29 Oct 2008 05:54:26 +0000 (+0100) Subject: src/utils_dns.c: Cast a `char' to `int' when using `tolower'. X-Git-Tag: collectd-4.4.5~18 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=4639bd0e1865a24158a3f7b46ea9b6d95cbf3f4e src/utils_dns.c: Cast a `char' to `int' when using `tolower'. This is needed at least on NetBSD, but probably on other non-GNU libcs as well. Resolves: #32 --- diff --git a/src/utils_dns.c b/src/utils_dns.c index 9b001517..46e6018e 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -390,7 +390,7 @@ handle_dns(const char *buf, int len, while ((t = strchr(qh.qname, '\r'))) *t = ' '; for (t = qh.qname; *t; t++) - *t = tolower(*t); + *t = tolower((int) *t); memcpy(&us, buf + offset, 2); qh.qtype = ntohs(us);