aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-02 16:25:07 +0000
committerYang Tse <yangsita@gmail.com>2010-02-02 16:25:07 +0000
commitd1717e7c9079a5f2b6291fa1fefe95d1348f8cc5 (patch)
tree708af8d09980a0bb3bd6d00a7a6406232dcf1607 /lib/connect.c
parente569ff959fb5be62e47eec38fec7d97014bf785f (diff)
Fix compiler warning: conditional expression is constant
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 35c3d4855..1d2947488 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -205,7 +205,7 @@ int waitconnect(struct connectdata *conn,
(void)verifyconnect(sockfd, NULL);
#endif
- while(1) {
+ for(;;) {
/* now select() until we get connect or timeout */
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) {
/* we succeeded to bind */
struct Curl_sockaddr_storage add;
@@ -415,7 +415,7 @@ static CURLcode bindlocal(struct connectdata *conn,
}
else
break;
- } while(1);
+ }
data->state.os_errno = error = SOCKERRNO;
failf(data, "bind failed with errno %d: %s",