Convert NULL -> nullptr in C++

This commit is contained in:
Michał Janiszewski authored and Michał Janiszewski committed 2017-08-15 11:51:56 +02:00
1 parent 44c8c84b7c
commit d698ad1100
94 files changed
+3189 -3189

No files matched your search

+3 -3
View File
@@ -353,7 +353,7 @@ bool NetworkKey::Sign(const uint8 * md, const size_t len, char ** signature, siz
*signature = nullptr;
/* Create the Message Digest Context */
if ((mdctx = EVP_MD_CTX_create()) == NULL)
if ((mdctx = EVP_MD_CTX_create()) == nullptr)
{
log_error("Failed to create MD context");
return false;
@@ -385,7 +385,7 @@ bool NetworkKey::Sign(const uint8 * md, const size_t len, char ** signature, siz
uint8 * sig;
/* Allocate memory for the signature based on size in slen */
if ((sig = (unsigned char*)malloc((sint32)(sizeof(unsigned char) * (*out_size)))) == NULL)
if ((sig = (unsigned char*)malloc((sint32)(sizeof(unsigned char) * (*out_size)))) == nullptr)
{
log_error("Failed to crypto-allocate space for signature");
EVP_MD_CTX_destroy(mdctx);
@@ -411,7 +411,7 @@ bool NetworkKey::Verify(const uint8 * md, const size_t len, const char * sig, co
EVP_MD_CTX * mdctx = nullptr;
/* Create the Message Digest Context */
if ((mdctx = EVP_MD_CTX_create()) == NULL)
if ((mdctx = EVP_MD_CTX_create()) == nullptr)
{
log_error("Failed to create MD context");
return false;