diff options
author | Yang Tse <yangsita@gmail.com> | 2006-10-27 02:18:29 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-10-27 02:18:29 +0000 |
commit | 8a7514de8ace5dcb9fe322043cc7cfe5372646dd (patch) | |
tree | 98f5937fe2f9795fd0c57b4c4cd917e23c0fee87 | |
parent | 32ad212ac94577f7f6a245a5dc72b42039bd0b42 (diff) |
Compiler warning fix
-rw-r--r-- | lib/socks.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/socks.c b/lib/socks.c index fb6f7fe25..3319e697e 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -71,25 +71,29 @@ static int blockread_all(struct connectdata *conn, /* connection data */ conntime = Curl_tvdiff(tvnow, conn->created); if(conntime > conn_timeout) { /* we already got the timeout */ - return -1; + result = ~CURLE_OK; + break; } if(Curl_select(sockfd, CURL_SOCKET_BAD, (int)(conn_timeout - conntime)) <= 0) { - return -1; + result = ~CURLE_OK; + break; } result = Curl_read(conn, sockfd, buf, buffersize, &nread); if(result) - return result; + break; if(buffersize == nread) { allread += nread; *n = allread; - return CURLE_OK; + result = CURLE_OK; + break; } buffersize -= nread; buf += nread; allread += nread; } while(1); + return result; } /* |