mirror of
https://github.com/yawut/SDL.git
synced 2026-07-02 00:13:39 -05:00
move variable declaration to beginning of function
This commit is contained in:
parent
86ff46800f
commit
7c3cb6e7f4
|
|
@ -79,12 +79,12 @@ SDL_mutexP(SDL_mutex * mutex)
|
|||
int
|
||||
SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
int retval = 0;
|
||||
if (mutex == NULL) {
|
||||
SDL_SetError("Passed a NULL mutex");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int retval = 0;
|
||||
if (TryEnterCriticalSection(&mutex->cs) == 0) {
|
||||
retval = SDL_MUTEX_TIMEDOUT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user