mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Compiler warning fix
This commit is contained in:
parent
32ad212ac9
commit
8a7514de8a
12
lib/socks.c
12
lib/socks.c
@ -71,25 +71,29 @@ static int blockread_all(struct connectdata *conn, /* connection data */
|
|||||||
conntime = Curl_tvdiff(tvnow, conn->created);
|
conntime = Curl_tvdiff(tvnow, conn->created);
|
||||||
if(conntime > conn_timeout) {
|
if(conntime > conn_timeout) {
|
||||||
/* we already got the timeout */
|
/* we already got the timeout */
|
||||||
return -1;
|
result = ~CURLE_OK;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(Curl_select(sockfd, CURL_SOCKET_BAD,
|
if(Curl_select(sockfd, CURL_SOCKET_BAD,
|
||||||
(int)(conn_timeout - conntime)) <= 0) {
|
(int)(conn_timeout - conntime)) <= 0) {
|
||||||
return -1;
|
result = ~CURLE_OK;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
result = Curl_read(conn, sockfd, buf, buffersize, &nread);
|
result = Curl_read(conn, sockfd, buf, buffersize, &nread);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
break;
|
||||||
|
|
||||||
if(buffersize == nread) {
|
if(buffersize == nread) {
|
||||||
allread += nread;
|
allread += nread;
|
||||||
*n = allread;
|
*n = allread;
|
||||||
return CURLE_OK;
|
result = CURLE_OK;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
buffersize -= nread;
|
buffersize -= nread;
|
||||||
buf += nread;
|
buf += nread;
|
||||||
allread += nread;
|
allread += nread;
|
||||||
} while(1);
|
} while(1);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user