Use nullptr where possible instead of NULL or 0

This commit is contained in:
Johannes Kauffmann
2022-11-22 19:09:31 +01:00
committed by Jeremy Hayes
parent 728c689574
commit a7603c132d
38 changed files with 248 additions and 248 deletions

View File

@@ -102,7 +102,7 @@ bool InitThread()
return false;
}
if (OS_GetTLSValue(ThreadInitializeIndex) != 0)
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr)
return true;
if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
@@ -130,8 +130,8 @@ bool DetachThread()
//
// Function is re-entrant and this thread may not have been initialized.
//
if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr) {
if (!OS_SetTLSValue(ThreadInitializeIndex, nullptr)) {
assert(0 && "DetachThread(): Unable to clear init flag.");
success = false;
}