Selaa lähdekoodia

Tweak loop condition

rl1987 6 vuotta sitten
vanhempi
commit
a28e350cff
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;