From: Flavio Medeiros Date: Sun, 29 Nov 2015 14:12:16 +0000 (-0300) Subject: Curl_read_plain: clean up ifdefs that break statements X-Git-Tag: curl-7_46_0~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e55f15454efacb0b18aaeb33471efd843e608b08;p=curl Curl_read_plain: clean up ifdefs that break statements Closes #546 --- 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;