diff options
Diffstat (limited to 'lib/easy.c')
-rw-r--r-- | lib/easy.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/easy.c b/lib/easy.c index 53f417fc3..637d99bb0 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -1108,7 +1108,6 @@ CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, size_t *n) { curl_socket_t sfd; CURLcode ret; - int ret1; ssize_t n1; struct connectdata *c; struct SessionHandle *data = (struct SessionHandle *)curl; @@ -1118,13 +1117,10 @@ CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, size_t *n) return ret; *n = 0; - ret1 = Curl_read(c, sfd, buffer, buflen, &n1); + ret = Curl_read(c, sfd, buffer, buflen, &n1); - if(ret1 == -1) - return CURLE_AGAIN; - - if(ret1 != CURLE_OK) - return (CURLcode)ret1; + if(ret != CURLE_OK) + return ret; *n = (size_t)n1; |