From 0a9488c7ccd392894e9d0c601511eb8373a48bfe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 10 Feb 2023 23:27:15 +0100 Subject: [PATCH] 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 --- lib/vtls/openssl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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; -- 2.47.3