mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 10:17:54 +00:00
Don't do NULL-checks before SDL_free()
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
This commit is contained in:
parent
2f810e0a5f
commit
aaee09d6ed
40 changed files with 76 additions and 229 deletions
|
|
@ -37,9 +37,7 @@ SDL_Mutex *SDL_CreateMutex(void)
|
|||
|
||||
void SDL_DestroyMutex(SDL_Mutex *mutex)
|
||||
{
|
||||
if (mutex) {
|
||||
SDL_free(mutex);
|
||||
}
|
||||
SDL_free(mutex);
|
||||
}
|
||||
|
||||
void SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doesn't know about NULL mutexes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue