Refrain from including <ctype.h>

This commit is contained in:
rl1987 2018-02-12 21:26:57 +01:00 committed by Nick Mathewson
parent 12afd8bfed
commit 6335db9fce
1 changed files with 2 additions and 4 deletions

View File

@ -100,8 +100,6 @@
#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);
}