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/http_proxy.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/http_proxy.c')
-rw-r--r-- | lib/http_proxy.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c index f09304a26..d53685f53 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -293,10 +293,8 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(!Curl_conn_data_pending(conn, sockindex)) /* return so we'll be called again polling-style */ return CURLE_OK; - else { - DEBUGF(infof(data, - "Read response immediately from proxy CONNECT\n")); - } + DEBUGF(infof(data, + "Read response immediately from proxy CONNECT\n")); } /* at this point, the tunnel_connecting phase is over. */ @@ -342,7 +340,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } continue; } - else if(result) { + if(result) { keepon = FALSE; break; } @@ -617,11 +615,9 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(conn->bits.proxy_connect_closed) /* this is not an error, just part of the connection negotiation */ return CURLE_OK; - else { - failf(data, "Received HTTP code %d from proxy after CONNECT", - data->req.httpcode); - return CURLE_RECV_ERROR; - } + failf(data, "Received HTTP code %d from proxy after CONNECT", + data->req.httpcode); + return CURLE_RECV_ERROR; } conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; |