[tor-commits] [tor/master] Tweak loop condition

nickm at torproject.org nickm at torproject.org
Wed Mar 28 11:50:56 UTC 2018


commit a28e350cff1572a1e5a0c5df93f6e6005904689a
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date:   Wed Feb 21 20:25:24 2018 +0100

    Tweak loop condition
---
 src/common/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/util.c b/src/common/util.c
index 53e117f24..497b60be1 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;





More information about the tor-commits mailing list