mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -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);
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user