[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.3.3] Tweak loop condition



commit a28e350cff1572a1e5a0c5df93f6e6005904689a
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
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;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits