[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.3.3] Refrain from including <ctype.h>
commit 6335db9fce4275838c7de4bc10e522eb21a21ed8
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date: Mon Feb 12 21:26:57 2018 +0100
Refrain from including <ctype.h>
---
src/common/util.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/common/util.c b/src/common/util.c
index d8891c6a5..a7eaf5389 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -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);
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits