mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-22 19:18:30 +00:00
Cleanup of SDL_SetError that already return -1 value
This commit is contained in:
@@ -92,8 +92,7 @@ SDL_LockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
if (mutex == NULL)
|
||||
{
|
||||
SDL_SetError("Passed a NULL mutex.");
|
||||
return -1;
|
||||
return SDL_SetError("Passed a NULL mutex.");
|
||||
}
|
||||
|
||||
RMutex rmutex;
|
||||
@@ -109,8 +108,7 @@ SDL_UnlockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
if ( mutex == NULL )
|
||||
{
|
||||
SDL_SetError("Passed a NULL mutex.");
|
||||
return -1;
|
||||
return SDL_SetError("Passed a NULL mutex.");
|
||||
}
|
||||
|
||||
RMutex rmutex;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user