aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sendf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index 5f39d1f2d..ea666e90f 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -520,11 +520,13 @@ CURLcode Curl_read_plain(curl_socket_t sockfd,
if(-1 == nread) {
int err = SOCKERRNO;
+ int return_error;
#ifdef USE_WINSOCK
- if(WSAEWOULDBLOCK == err)
+ return_error = WSAEWOULDBLOCK == err;
#else
- if((EWOULDBLOCK == err) || (EAGAIN == err) || (EINTR == err))
+ return_error = EWOULDBLOCK == err || EAGAIN == err || EINTR == err;
#endif
+ if(return_error)
return CURLE_AGAIN;
else
return CURLE_RECV_ERROR;