Pointer as bool (libsdl-org#7214)

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2023-11-09 14:18:36 -08:00
1 parent 23db971681
commit d8600f717e
371 files changed
+2448 -2442

No files matched your search

+4 -4
View File
@@ -90,7 +90,7 @@ SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
void SDL_DestroySemaphore(SDL_Semaphore *sem)
{
if (sem != NULL) {
if (sem) {
RSemaphore sema;
sema.SetHandle(sem->handle);
sema.Signal(sema.Count());
@@ -102,7 +102,7 @@ void SDL_DestroySemaphore(SDL_Semaphore *sem)
int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
{
if (sem == NULL) {
if (!sem) {
return SDL_InvalidParamError("sem");
}
@@ -140,7 +140,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
{
if (sem == NULL) {
if (!sem) {
SDL_InvalidParamError("sem");
return 0;
}
@@ -149,7 +149,7 @@ Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
int SDL_PostSemaphore(SDL_Semaphore *sem)
{
if (sem == NULL) {
if (!sem) {
return SDL_InvalidParamError("sem");
}
sem->count++;