src/utils_dns.c: Cast a `char' to `int' when using `tolower'.
[collectd.git] / src / utils_dns.c
index 9b00151..46e6018 100644 (file)
@@ -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);