Cleanup of SDL_SetError that already return -1 value

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2022-11-18 06:59:10 -08:00
1 parent 3e70553c48
commit 16824865c2
4 files changed
+7 -14

No files matched your search

+2 -4
View File
@@ -119,8 +119,7 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
{
if (! sem)
{
SDL_SetError("Passed a NULL sem");
return -1;
return SDL_SetError("Passed a NULL sem");
}
if (timeout == SDL_MUTEX_MAXWAIT)
@@ -182,8 +181,7 @@ SDL_SemPost(SDL_sem * sem)
{
if (! sem)
{
SDL_SetError("Passed a NULL sem.");
return -1;
return SDL_SetError("Passed a NULL sem.");
}
sem->count++;
RSemaphore sema;