fix compiler warning
This commit is contained in:
Родитель
2ea70a5c73
Коммит
4acbe8f20c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
13
lib/http.c
13
lib/http.c
|
@ -203,10 +203,9 @@ char *Curl_copy_header_value(const char *h)
|
|||
++h;
|
||||
|
||||
/* Find the first non-space letter */
|
||||
for(start=h;
|
||||
*start && ISSPACE(*start);
|
||||
start++)
|
||||
; /* empty loop */
|
||||
start = h;
|
||||
while(*start && ISSPACE(*start))
|
||||
start++;
|
||||
|
||||
/* data is in the host encoding so
|
||||
use '\r' and '\n' instead of 0x0d and 0x0a */
|
||||
|
@ -215,10 +214,12 @@ char *Curl_copy_header_value(const char *h)
|
|||
end = strchr(start, '\n');
|
||||
if(!end)
|
||||
end = strchr(start, '\0');
|
||||
if(!end)
|
||||
return NULL;
|
||||
|
||||
/* skip all trailing space letters */
|
||||
for(; ISSPACE(*end) && (end > start); end--)
|
||||
; /* empty loop */
|
||||
while((end > start) && ISSPACE(*end))
|
||||
end--;
|
||||
|
||||
/* get length of the type */
|
||||
len = end-start+1;
|
||||
|
|
|
@ -1255,10 +1255,9 @@ static CURLcode readwrite_headers(struct SessionHandle *data,
|
|||
char *start;
|
||||
|
||||
/* Find the first non-space letter */
|
||||
for(start=k->p+17;
|
||||
*start && ISSPACE(*start);
|
||||
start++)
|
||||
; /* empty loop */
|
||||
start = k->p + 17;
|
||||
while(*start && ISSPACE(*start))
|
||||
start++;
|
||||
|
||||
/* Record the content-encoding for later use */
|
||||
if(checkprefix("identity", start))
|
||||
|
|
|
@ -231,8 +231,10 @@ void Curl_safefree(void *ptr)
|
|||
static void close_connections(struct SessionHandle *data)
|
||||
{
|
||||
/* Loop through all open connections and kill them one by one */
|
||||
while(-1 != ConnectionKillOne(data))
|
||||
; /* empty loop */
|
||||
long i;
|
||||
do {
|
||||
i = ConnectionKillOne(data);
|
||||
while(i != -1L);
|
||||
}
|
||||
|
||||
void Curl_freeset(struct SessionHandle * data)
|
||||
|
|
Загрузка…
Ссылка в новой задаче