Remove redundant 'SDL_GetErrBuf' declaration

This commit is contained in:
Sylvain Becker 2019-10-30 17:35:40 +01:00
parent 9e509e4a4f
commit 81cdd50002
2 changed files with 6 additions and 10 deletions

View file

@ -205,6 +205,11 @@ SDL_Generic_SetTLSData(SDL_TLSData *storage)
SDL_error *
SDL_GetErrBuf(void)
{
#if SDL_THREADS_DISABLED
/* Non-thread-safe global error variable */
static SDL_error SDL_global_error;
return &SDL_global_error;
#else
static SDL_SpinLock tls_lock;
static SDL_bool tls_being_created;
static SDL_TLSID tls_errbuf;
@ -249,6 +254,7 @@ SDL_GetErrBuf(void)
SDL_TLSSet(tls_errbuf, errbuf, SDL_free);
}
return errbuf;
#endif /* SDL_THREADS_DISABLED */
}