diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2017-03-10 14:28:37 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-03-13 23:11:45 +0100 |
commit | 66de563482c0fd4324e1eae19809d2499e3c4fa8 (patch) | |
tree | bf3178878ebe2461388e8fec01e321173ffe30f8 /lib/sendf.c | |
parent | db87bcfcf21f8c3b8188d0c5ab82faf804ffd5ea (diff) | |
download | curl-66de563482c0fd4324e1eae19809d2499e3c4fa8.tar.gz |
Improve code readbility
... by removing the else branch after a return, break or continue.
Closes #1310
Diffstat (limited to 'lib/sendf.c')
-rw-r--r-- | lib/sendf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sendf.c b/lib/sendf.c index 760169782..9435a30e6 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -565,10 +565,9 @@ CURLcode Curl_client_chop_write(struct connectdata *conn, failf(data, "Write callback asked for PAUSE when not supported!"); return CURLE_WRITE_ERROR; } - else - return pausewrite(data, type, ptr, len); + return pausewrite(data, type, ptr, len); } - else if(wrote != chunklen) { + if(wrote != chunklen) { failf(data, "Failed writing body (%zu != %zu)", wrote, chunklen); return CURLE_WRITE_ERROR; } @@ -652,8 +651,7 @@ CURLcode Curl_read_plain(curl_socket_t sockfd, #endif if(return_error) return CURLE_AGAIN; - else - return CURLE_RECV_ERROR; + return CURLE_RECV_ERROR; } /* we only return number of bytes read when we return OK */ |