Skip to content

Commit 38ab39b

Browse files
committed
Clang-Tidy
1 parent d2fee4b commit 38ab39b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cpr/ssl_ctx.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include <curl/curl.h>
66
#include <iostream>
77
#include <memory>
8-
#include <sstream>
9-
#include <string>
108

119
#if SUPPORT_CURLOPT_SSL_CTX_FUNCTION
1210

@@ -108,14 +106,14 @@ CURLcode sslctx_function_load_ca_cert_from_buffer(CURL* /*curl*/, void* sslctx,
108106
ERR_print_errors_fp(stderr);
109107
BIO_free(bio);
110108
return CURLE_ABORTED_BY_CALLBACK;
111-
} else {
112-
certs_loaded++;
113109
}
110+
certs_loaded++;
114111
// Free cert so we can load another one
115112
X509_free(cert);
116113
cert = nullptr;
117114
}
118115

116+
// NOLINTNEXTLINE(google-runtime-int) Ignored here since it is an API return value
119117
const unsigned long err = ERR_peek_last_error();
120118
if (certs_loaded == 0 && err != 0) {
121119
// Check if the error is just EOF or an actual parsing error

0 commit comments

Comments
 (0)