From: Daniel Stenberg Date: Wed, 6 Apr 2022 06:33:19 +0000 (+0200) Subject: schannel: remove dead code that will never run X-Git-Tag: curl-7_83_0~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbba7dd796888fe46fdb56068b4b44852c513634;p=thirdparty%2Fcurl.git schannel: remove dead code that will never run As the condition can't ever evaluate true Reported-by: Andrey Alifanov Ref: #8675 Closes #8677 --- 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,