summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-02-21 20:25:24 +0100
committerNick Mathewson <nickm@torproject.org>2018-03-28 07:39:03 -0400
commita28e350cff1572a1e5a0c5df93f6e6005904689a (patch)
tree8915d67dca9700587c4af59e5a276578d34bba66
parent6b6d003f43cbbf01b40cedb0cc12ada2e81461f9 (diff)
downloadtor-a28e350cff1572a1e5a0c5df93f6e6005904689a.tar.gz
tor-a28e350cff1572a1e5a0c5df93f6e6005904689a.zip
Tweak loop condition
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 53e117f24c..497b60be15 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1145,7 +1145,7 @@ string_is_valid_hostname(const char *string)
do {
result = (TOR_ISALNUM(*c) || (*c == '-') || (*c == '_'));
c++;
- } while (result > 0 && *c);
+ } while (result && *c);
if (result == 0) {
break;