Explorar o código

Tweak loop condition

rl1987 %!s(int64=6) %!d(string=hai) anos
pai
achega
a28e350cff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;