refactor(Core): NULL -> nullptr (#3275)

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
Kitzunu
2020-08-31 11:55:09 +02:00
committed by GitHub
parent 38903b5dfb
commit 1f89282b22
325 changed files with 2348 additions and 2348 deletions

View File

@@ -180,7 +180,7 @@ Patcher PatchesCache;
// Constructor - set the N and g values for SRP6
AuthSocket::AuthSocket(RealmSocket& socket) :
pPatch(NULL), socket_(socket), _status(STATUS_CHALLENGE), _build(0),
pPatch(nullptr), socket_(socket), _status(STATUS_CHALLENGE), _build(0),
_expversion(0), _accountSecurityLevel(SEC_PLAYER)
{
N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
@@ -331,7 +331,7 @@ bool AuthSocket::_HandleLogonChallenge()
{
ACORE_GUARD(ACE_Thread_Mutex, LastLoginAttemptMutex);
std::string ipaddr = socket().getRemoteAddress();
uint32 currTime = time(NULL);
uint32 currTime = time(nullptr);
std::map<std::string, uint32>::iterator itr = LastLoginAttemptTimeForIP.find(ipaddr);
if (itr != LastLoginAttemptTimeForIP.end() && itr->second >= currTime)
{
@@ -635,7 +635,7 @@ bool AuthSocket::_HandleLogonProof()
}
SHA1Hash sha;
sha.UpdateBigNumbers(&A, &B, NULL);
sha.UpdateBigNumbers(&A, &B, nullptr);
sha.Finalize();
BigNumber u;
u.SetBinary(sha.GetDigest(), 20);
@@ -671,11 +671,11 @@ bool AuthSocket::_HandleLogonProof()
uint8 hash[20];
sha.Initialize();
sha.UpdateBigNumbers(&N, NULL);
sha.UpdateBigNumbers(&N, nullptr);
sha.Finalize();
memcpy(hash, sha.GetDigest(), 20);
sha.Initialize();
sha.UpdateBigNumbers(&g, NULL);
sha.UpdateBigNumbers(&g, nullptr);
sha.Finalize();
for (int i = 0; i < 20; ++i)
@@ -691,9 +691,9 @@ bool AuthSocket::_HandleLogonProof()
memcpy(t4, sha.GetDigest(), SHA_DIGEST_LENGTH);
sha.Initialize();
sha.UpdateBigNumbers(&t3, NULL);
sha.UpdateBigNumbers(&t3, nullptr);
sha.UpdateData(t4, SHA_DIGEST_LENGTH);
sha.UpdateBigNumbers(&s, &A, &B, &K, NULL);
sha.UpdateBigNumbers(&s, &A, &B, &K, nullptr);
sha.Finalize();
BigNumber M;
M.SetBinary(sha.GetDigest(), 20);
@@ -721,7 +721,7 @@ bool AuthSocket::_HandleLogonProof()
// Finish SRP6 and send the final result to the client
sha.Initialize();
sha.UpdateBigNumbers(&A, &M, &K, NULL);
sha.UpdateBigNumbers(&A, &M, &K, nullptr);
sha.Finalize();
// Check auth token
@@ -947,7 +947,7 @@ bool AuthSocket::_HandleReconnectProof()
SHA1Hash sha;
sha.Initialize();
sha.UpdateData(_login);
sha.UpdateBigNumbers(&t1, &_reconnectProof, &K, NULL);
sha.UpdateBigNumbers(&t1, &_reconnectProof, &K, nullptr);
sha.Finalize();
if (!memcmp(sha.GetDigest(), lp.R2, SHA_DIGEST_LENGTH))
@@ -1209,7 +1209,7 @@ void Patcher::LoadPatchesInfo()
while (dirp)
{
errno = 0;
if ((dp = readdir(dirp)) != NULL)
if ((dp = readdir(dirp)) != nullptr)
{
int l = strlen(dp->d_name);