summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/select.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-22 16:55:14 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-22 16:55:14 (GMT)
commitec13ba36b5398f1d561d6e72d8e253d0eb3c2b5e (patch)
treebeb2cf13c007254d5daefa4bd929ce70520e890c /Utilities/cmcurl/lib/select.c
parent8b5cd17000a6fcf3cf9637c4a5048a7a91fc68e3 (diff)
parent031002456381245f88f64b0826798b1e249e8e39 (diff)
downloadCMake-ec13ba36b5398f1d561d6e72d8e253d0eb3c2b5e.zip
CMake-ec13ba36b5398f1d561d6e72d8e253d0eb3c2b5e.tar.gz
CMake-ec13ba36b5398f1d561d6e72d8e253d0eb3c2b5e.tar.bz2
Merge branch 'update-curl' into release-3.13
Merge-request: !2509
Diffstat (limited to 'Utilities/cmcurl/lib/select.c')
-rw-r--r--Utilities/cmcurl/lib/select.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Utilities/cmcurl/lib/select.c b/Utilities/cmcurl/lib/select.c
index 0406dd2..6e73890 100644
--- a/Utilities/cmcurl/lib/select.c
+++ b/Utilities/cmcurl/lib/select.c
@@ -80,7 +80,6 @@ int Curl_wait_ms(int timeout_ms)
#endif
struct curltime initial_tv;
int pending_ms;
- int error;
#endif
int r = 0;
@@ -98,6 +97,7 @@ int Curl_wait_ms(int timeout_ms)
pending_ms = timeout_ms;
initial_tv = Curl_now();
do {
+ int error;
#if defined(HAVE_POLL_FINE)
r = poll(NULL, 0, pending_ms);
#else
@@ -160,7 +160,6 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
#endif
struct curltime initial_tv = {0, 0};
int pending_ms = 0;
- int error;
int r;
int ret;
@@ -210,6 +209,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
}
do {
+ int error;
if(timeout_ms < 0)
pending_ms = -1;
else if(!timeout_ms)
@@ -291,6 +291,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
ptimeout = (timeout_ms < 0) ? NULL : &pending_tv;
do {
+ int error;
if(timeout_ms > 0) {
pending_tv.tv_sec = pending_ms / 1000;
pending_tv.tv_usec = (pending_ms % 1000) * 1000;
@@ -402,7 +403,6 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
bool fds_none = TRUE;
unsigned int i;
int pending_ms = 0;
- int error;
int r;
if(ufds) {
@@ -431,6 +431,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
#ifdef HAVE_POLL_FINE
do {
+ int error;
if(timeout_ms < 0)
pending_ms = -1;
else if(!timeout_ms)
@@ -502,6 +503,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
ptimeout = (timeout_ms < 0) ? NULL : &pending_tv;
do {
+ int error;
if(timeout_ms > 0) {
pending_tv.tv_sec = pending_ms / 1000;
pending_tv.tv_usec = (pending_ms % 1000) * 1000;