Pointer as bool (libsdl-org#7214)

This commit is contained in:
Sylvain
2023-11-09 22:29:15 +01:00
committed by Sam Lantinga
parent 23db971681
commit d8600f717e
371 changed files with 2448 additions and 2442 deletions

View File

@@ -53,7 +53,7 @@ void SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doe
int SDL_TryLockMutex(SDL_Mutex *mutex)
{
return (mutex == NULL) ? 0 : RecursiveLock_TryLock(&mutex->lock);
return (!mutex) ? 0 : RecursiveLock_TryLock(&mutex->lock);
}
void SDL_UnlockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes