aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFlavio Medeiros <flaviomotamedeiros@gmail.com>2015-11-29 11:12:16 -0300
committerDaniel Stenberg <daniel@haxx.se>2015-11-30 00:28:28 +0100
commite55f15454efacb0b18aaeb33471efd843e608b08 (patch)
treebc55c7d325542564a8372ac4828d10b5c6c3eb81 /lib
parentfe7c39d353d1fc616a0a83954ee580f17761a103 (diff)
Curl_read_plain: clean up ifdefs that break statements
Closes #546
Diffstat (limited to 'lib')
-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;