Parcourir la source

Tweak loop condition

rl1987 il y a 6 ans
Parent
commit
a28e350cff
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/common/util.c

+ 1 - 1
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;