]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
schannel: remove dead code that will never run
authorDaniel Stenberg <daniel@haxx.se>
Wed, 6 Apr 2022 06:33:19 +0000 (08:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 6 Apr 2022 06:33:20 +0000 (08:33 +0200)
As the condition can't ever evaluate true

Reported-by: Andrey Alifanov
Ref: #8675
Closes #8677

lib/vtls/schannel_verify.c

index 202a814cd997d1d15eca1467dd4ade82dfc7c4cd..4dc2d14e56d49fc0af28738876309fe2b8eba0b8 100644 (file)
@@ -286,7 +286,6 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store,
     goto cleanup;
   }
 
-  result = CURLE_OK;
   while(total_bytes_read < ca_file_bufsize) {
     DWORD bytes_to_read = (DWORD)(ca_file_bufsize - total_bytes_read);
     DWORD bytes_read = 0;
@@ -313,9 +312,6 @@ static CURLcode add_certs_file_to_store(HCERTSTORE trust_store,
   /* Null terminate the buffer */
   ca_file_buffer[ca_file_bufsize] = '\0';
 
-  if(result != CURLE_OK) {
-    goto cleanup;
-  }
   result = add_certs_data_to_store(trust_store,
                                    ca_file_buffer, ca_file_bufsize,
                                    ca_file,