mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
the _num_chars() function is not used, removing
This commit is contained in:
parent
8b6b15dccc
commit
f2a99d7d74
24
lib/hostip.c
24
lib/hostip.c
@ -199,30 +199,6 @@ const char *Curl_printable_address(const Curl_addrinfo *ip,
|
||||
return Curl_inet_ntop(af, af == AF_INET ? ip4 : ip6, buf, bufsize);
|
||||
}
|
||||
|
||||
/*
|
||||
* Count the number of characters that an integer would use in a string
|
||||
* (base 10).
|
||||
*/
|
||||
static int _num_chars(int i)
|
||||
{
|
||||
int chars = 0;
|
||||
|
||||
/* While the number divided by 10 is greater than one,
|
||||
* re-divide the number by 10, and increment the number of
|
||||
* characters by 1.
|
||||
*
|
||||
* this relies on the fact that for every multiple of 10,
|
||||
* a new digit is added onto every number
|
||||
*/
|
||||
do {
|
||||
chars++;
|
||||
|
||||
i = (int) i / 10;
|
||||
} while (i >= 1);
|
||||
|
||||
return chars;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a hostcache id string for the providing host + port, to be used by
|
||||
* the DNS caching.
|
||||
|
Loading…
Reference in New Issue
Block a user