]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Tweak loop condition
authorrl1987 <rl1987@sdf.lonestar.org>
Wed, 21 Feb 2018 19:25:24 +0000 (20:25 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 28 Mar 2018 11:39:03 +0000 (07:39 -0400)
src/common/util.c

index 53e117f24c5524e69d4df4d9fca18888688c426b..497b60be1530d7df592ce2296a4f72c0ce161095 100644 (file)
@@ -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;