Fix compiler warning: conditional expression is constant
This commit is contained in:
parent
e569ff959f
commit
d1717e7c90
@ -205,7 +205,7 @@ int waitconnect(struct connectdata *conn,
|
|||||||
(void)verifyconnect(sockfd, NULL);
|
(void)verifyconnect(sockfd, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while(1) {
|
for(;;) {
|
||||||
|
|
||||||
/* now select() until we get connect or timeout */
|
/* now select() until we get connect or timeout */
|
||||||
rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, (int)(timeout_msec>1000?
|
rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, (int)(timeout_msec>1000?
|
||||||
@ -385,7 +385,7 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
for(;;) {
|
||||||
if( bind(sockfd, sock, sizeof_sa) >= 0) {
|
if( bind(sockfd, sock, sizeof_sa) >= 0) {
|
||||||
/* we succeeded to bind */
|
/* we succeeded to bind */
|
||||||
struct Curl_sockaddr_storage add;
|
struct Curl_sockaddr_storage add;
|
||||||
@ -415,7 +415,7 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
} while(1);
|
}
|
||||||
|
|
||||||
data->state.os_errno = error = SOCKERRNO;
|
data->state.os_errno = error = SOCKERRNO;
|
||||||
failf(data, "bind failed with errno %d: %s",
|
failf(data, "bind failed with errno %d: %s",
|
||||||
|
@ -3488,7 +3488,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
#endif /* CURL_DOES_CONVERSIONS */
|
#endif /* CURL_DOES_CONVERSIONS */
|
||||||
|
|
||||||
while(1) {
|
for(;;) {
|
||||||
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
|
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
|
||||||
conn->data_prot = prot_cmd;
|
conn->data_prot = prot_cmd;
|
||||||
#endif
|
#endif
|
||||||
|
@ -210,7 +210,7 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn,
|
|||||||
write_len = strlen(s);
|
write_len = strlen(s);
|
||||||
sptr = s;
|
sptr = s;
|
||||||
|
|
||||||
while(1) {
|
for(;;) {
|
||||||
/* Write the buffer to the socket */
|
/* Write the buffer to the socket */
|
||||||
res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
|
res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
|
|||||||
struct timeval tvnow;
|
struct timeval tvnow;
|
||||||
long conntime;
|
long conntime;
|
||||||
*n = 0;
|
*n = 0;
|
||||||
do {
|
for(;;) {
|
||||||
tvnow = Curl_tvnow();
|
tvnow = Curl_tvnow();
|
||||||
/* calculating how long connection is establishing */
|
/* calculating how long connection is establishing */
|
||||||
conntime = Curl_tvdiff(tvnow, conn->created);
|
conntime = Curl_tvdiff(tvnow, conn->created);
|
||||||
@ -104,7 +104,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
|
|||||||
buffersize -= nread;
|
buffersize -= nread;
|
||||||
buf += nread;
|
buf += nread;
|
||||||
allread += nread;
|
allread += nread;
|
||||||
} while(1);
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -1325,7 +1325,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
|
|||||||
switch(waitret) {
|
switch(waitret) {
|
||||||
case WAIT_TIMEOUT:
|
case WAIT_TIMEOUT:
|
||||||
{
|
{
|
||||||
while(1) {
|
for(;;) {
|
||||||
if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL, &readfile_read, NULL)) {
|
if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL, &readfile_read, NULL)) {
|
||||||
keepon = FALSE;
|
keepon = FALSE;
|
||||||
code = CURLE_READ_ERROR;
|
code = CURLE_READ_ERROR;
|
||||||
|
@ -1949,7 +1949,7 @@ CURLcode Curl_perform(struct SessionHandle *data)
|
|||||||
* performed after this do-while loop.
|
* performed after this do-while loop.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
do {
|
for(;;) {
|
||||||
res = connect_host(data, &conn); /* primary connection */
|
res = connect_host(data, &conn); /* primary connection */
|
||||||
|
|
||||||
if(res == CURLE_OK) {
|
if(res == CURLE_OK) {
|
||||||
@ -2052,7 +2052,7 @@ CURLcode Curl_perform(struct SessionHandle *data)
|
|||||||
}
|
}
|
||||||
break; /* it only reaches here when this shouldn't loop */
|
break; /* it only reaches here when this shouldn't loop */
|
||||||
|
|
||||||
} while(1); /* loop if Location: */
|
} /* loop if Location: */
|
||||||
|
|
||||||
if(newurl)
|
if(newurl)
|
||||||
free(newurl);
|
free(newurl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user