]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Refrain from including <ctype.h>
authorrl1987 <rl1987@sdf.lonestar.org>
Mon, 12 Feb 2018 20:26:57 +0000 (21:26 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 28 Mar 2018 11:39:03 +0000 (07:39 -0400)
src/common/util.c

index d8891c6a53b1a9838c5367d9c1814db228e09c25..a7eaf5389cf6994a3025fee381eb6080268e67ec 100644 (file)
 #undef MALLOC_ZERO_WORKS
 #endif
 
-#include <ctype.h>
-
 /* =====
  * Memory management
  * ===== */
@@ -1128,12 +1126,12 @@ string_is_valid_hostname(const char *string)
 
     if (c_sl_idx == c_sl_len - 1) {
       do {
-        result = isalpha(*c);
+        result = TOR_ISALPHA(*c);
         c++;
       } while (result && *c);
     } else {
       do {
-        result = (isalnum(*c) || (*c == '-') || (*c == '_'));
+        result = (TOR_ISALNUM(*c) || (*c == '-') || (*c == '_'));
         c++;
       } while (result > 0 && *c);
     }