*/
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;
}
++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 */
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;
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))
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)