diff options
author | Flavio Medeiros <flaviomotamedeiros@gmail.com> | 2015-11-29 11:12:16 -0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-11-30 00:28:28 +0100 |
commit | e55f15454efacb0b18aaeb33471efd843e608b08 (patch) | |
tree | bc55c7d325542564a8372ac4828d10b5c6c3eb81 | |
parent | fe7c39d353d1fc616a0a83954ee580f17761a103 (diff) | |
download | curl-e55f15454efacb0b18aaeb33471efd843e608b08.tar.gz |
Curl_read_plain: clean up ifdefs that break statements
Closes #546
-rw-r--r-- | lib/sendf.c | 6 |
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; |