From: Daniel Stenberg Date: Fri, 10 Feb 2023 22:27:15 +0000 (+0100) Subject: openssl: remove dead code X-Git-Tag: curl-7_88_0~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a9488c7ccd392894e9d0c601511eb8373a48bfe;p=thirdparty%2Fcurl.git openssl: remove dead code Follow-up to e8b00fcd6a Due to the new 'if(!nonblocking)' check on the block a level above, there is no need to check for it again within the same conditional. Detected by Coverity Closes #10473 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index aa394fdeee..51d2de9e3d 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -4352,7 +4352,7 @@ static CURLcode ossl_connect_common(struct Curl_cfilter *cf, connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking?0:timeout_ms); + timeout_ms); if(what < 0) { /* fatal error */ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); @@ -4360,11 +4360,6 @@ static CURLcode ossl_connect_common(struct Curl_cfilter *cf, goto out; } if(0 == what) { - if(nonblocking) { - *done = FALSE; - result = CURLE_OK; - goto out; - } /* timeout */ failf(data, "SSL connection timeout"); result = CURLE_OPERATION_TIMEDOUT;