Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
src: improve code formatting of node_crypto.cc
Removed extraneous braces and superfluous scope comments.
  • Loading branch information
ebickle committed Apr 8, 2020
commit 7c337f74f227b5b97e71489b0027f0b590e2027a
5 changes: 1 addition & 4 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1004,9 +1004,8 @@ static X509_STORE* NewRootCertStore() {
X509_STORE_set_default_paths(store);
} else {
Mutex::ScopedLock lock(root_certs_vector_mutex);
for (X509* cert : root_certs_vector) {
for (X509* cert : root_certs_vector)
X509_STORE_add_cert(store, cert);
}
}

return store;
Expand Down Expand Up @@ -1085,7 +1084,6 @@ static unsigned long AddRootCertsFromFile( // NOLINT(runtime/int)
if (!bio)
return ERR_get_error();

// Scope for root_certs_vector lock
{
Mutex::ScopedLock lock(root_certs_vector_mutex);
while (X509* x509 =
Expand Down Expand Up @@ -6643,7 +6641,6 @@ void GetRootCertificates(const FunctionCallbackInfo<Value>& args) {

std::vector<Local<Value>> result;

// Scope for root_certs_vector lock
{
Mutex::ScopedLock lock(root_certs_vector_mutex);

Expand Down