move variable declaration to beginning of function
This commit is contained in:
parent
4e631c1583
commit
3ab8d4ce1a
1 changed files with 1 additions and 1 deletions
|
@ -79,12 +79,12 @@ SDL_mutexP(SDL_mutex * mutex)
|
||||||
int
|
int
|
||||||
SDL_TryLockMutex(SDL_mutex * mutex)
|
SDL_TryLockMutex(SDL_mutex * mutex)
|
||||||
{
|
{
|
||||||
|
int retval = 0;
|
||||||
if (mutex == NULL) {
|
if (mutex == NULL) {
|
||||||
SDL_SetError("Passed a NULL mutex");
|
SDL_SetError("Passed a NULL mutex");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int retval = 0;
|
|
||||||
if (TryEnterCriticalSection(&mutex->cs) == 0) {
|
if (TryEnterCriticalSection(&mutex->cs) == 0) {
|
||||||
retval = SDL_MUTEX_TIMEDOUT;
|
retval = SDL_MUTEX_TIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue