aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-10-17 12:53:53 +0000
committerYang Tse <yangsita@gmail.com>2008-10-17 12:53:53 +0000
commit4acbe8f20c45ed43768ff4d25ec6718c2f1dd6dd (patch)
tree655e4757c39d4e34901d3b918c2e21f71449a1bc /lib/hostip.c
parent2ea70a5c73561b4b0ecf033edb17d4db8317407e (diff)
fix compiler warning
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c8
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;
}