diff options
Diffstat (limited to 'lib/hostip.c')
-rw-r--r-- | lib/hostip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 95029e6b2..cee5bc2d8 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -163,9 +163,11 @@ void Curl_global_host_cache_dtor(void) */ int Curl_num_addresses(const Curl_addrinfo *addr) { - int i; - for (i = 0; addr; addr = addr->ai_next, i++) - ; /* empty loop */ + int i = 0; + while(addr) { + addr = addr->ai_next; + i++; + } return i; } |