Ran clang-format across all files

This commit is contained in:
Pedro Pinto committed 2020-12-30 17:11:18 -05:00
1 parent a27321df2e
commit 8f21a77150
1123 files changed
+159414 -162346

No files matched your search

+17 -26
View File
@@ -1,35 +1,30 @@
#ifndef _WIN32
#include "CryptoInit.h"
#include <tbb/spin_mutex.h>
#include <stdlib.h>
#include <tbb/spin_mutex.h>
namespace openssl
{
namespace openssl {
#include <openssl/bio.h>
#include <openssl/rand.h>
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
}
#include <openssl/rand.h>
#include <openssl/rsa.h>
} // namespace openssl
namespace bts
{
namespace crypto
{
namespace bts {
namespace crypto {
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
static const char rnd_seed[] =
"string to make the random number generator think it has entropy";
bool CryptoInit::init = false;
tbb::spin_mutex _lock;
void CryptoInit::initialize()
{
if(!init)
{
void CryptoInit::initialize() {
if (!init) {
tbb::spin_mutex::scoped_lock lock(_lock);
if(!init)
{
if (!init) {
openssl::OpenSSL_add_all_algorithms();
openssl::OpenSSL_add_all_ciphers();
openssl::OpenSSL_add_all_digests();
@@ -38,19 +33,15 @@ void CryptoInit::initialize()
}
}
}
void CryptoInit::cleanup()
{
if(init)
{
void CryptoInit::cleanup() {
if (init) {
tbb::spin_mutex::scoped_lock lock(_lock);
if(init)
{
if (init) {
init = false;
}
}
}
}
}
} // namespace crypto
} // namespace bts
#endif