fix leak
[oweals/gnunet.git] / src / dns / dnsparser.c
index 36b4c36f170b4f0443aa444073815929e3985f0c..30d9245ff7bd7ee5de002a289b6fef66e2569533 100644 (file)
@@ -1278,8 +1278,8 @@ GNUNET_DNSPARSER_hex_to_bin (const char *hex,
   in[2] = '\0';
   for (off = 0; off < data_size; off++)
   {
-    in[0] = tolower ((int) hex[off * 2]);
-    in[1] = tolower ((int) hex[off * 2 + 1]);
+    in[0] = tolower ((unsigned char) hex[off * 2]);
+    in[1] = tolower ((unsigned char) hex[off * 2 + 1]);
     if (1 != sscanf (in, "%x", &h))
       return off;
     idata[off] = (uint8_t) h;