From fbba7dd796888fe46fdb56068b4b44852c513634 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 6 Apr 2022 08:33:19 +0200 Subject: [PATCH] schannel: remove dead code that will never run As the condition can't ever evaluate true Reported-by: Andrey Alifanov Ref: #8675 Closes #8677 --- lib/vtls/schannel_verify.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/vtls/schannel_verify.c b/lib/vtls/schannel_verify.c index 202a814cd9..4dc2d14e56 100644 --- a/lib/vtls/schannel_verify.c +++ b/lib/vtls/schannel_verify.c @@ -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,