mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Refrain from including <ctype.h>
This commit is contained in:
parent
12afd8bfed
commit
6335db9fce
@ -100,8 +100,6 @@
|
|||||||
#undef MALLOC_ZERO_WORKS
|
#undef MALLOC_ZERO_WORKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
/* =====
|
/* =====
|
||||||
* Memory management
|
* Memory management
|
||||||
* ===== */
|
* ===== */
|
||||||
@ -1128,12 +1126,12 @@ string_is_valid_hostname(const char *string)
|
|||||||
|
|
||||||
if (c_sl_idx == c_sl_len - 1) {
|
if (c_sl_idx == c_sl_len - 1) {
|
||||||
do {
|
do {
|
||||||
result = isalpha(*c);
|
result = TOR_ISALPHA(*c);
|
||||||
c++;
|
c++;
|
||||||
} while (result && *c);
|
} while (result && *c);
|
||||||
} else {
|
} else {
|
||||||
do {
|
do {
|
||||||
result = (isalnum(*c) || (*c == '-') || (*c == '_'));
|
result = (TOR_ISALNUM(*c) || (*c == '-') || (*c == '_'));
|
||||||
c++;
|
c++;
|
||||||
} while (result > 0 && *c);
|
} while (result > 0 && *c);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user