]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: remove dead code
authorDaniel Stenberg <daniel@haxx.se>
Fri, 10 Feb 2023 22:27:15 +0000 (23:27 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 11 Feb 2023 08:50:23 +0000 (09:50 +0100)
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

index aa394fdeee530609738fb860c85a1748e0e552d1..51d2de9e3dfcf80451a8d3bec39d2371aeaddec3 100644 (file)
@@ -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;