mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-16 16:28:13 +00:00
Clang-Tidy fixes (#6725)
This commit is contained in:
@@ -152,7 +152,7 @@ SDL_Generic_GetTLSData(void)
|
||||
return storage;
|
||||
}
|
||||
|
||||
int SDL_Generic_SetTLSData(SDL_TLSData *storage)
|
||||
int SDL_Generic_SetTLSData(SDL_TLSData *data)
|
||||
{
|
||||
SDL_threadID thread = SDL_ThreadID();
|
||||
SDL_TLSEntry *prev, *entry;
|
||||
@@ -162,10 +162,10 @@ int SDL_Generic_SetTLSData(SDL_TLSData *storage)
|
||||
prev = NULL;
|
||||
for (entry = SDL_generic_TLS; entry; entry = entry->next) {
|
||||
if (entry->thread == thread) {
|
||||
if (storage) {
|
||||
entry->storage = storage;
|
||||
if (data != NULL) {
|
||||
entry->storage = data;
|
||||
} else {
|
||||
if (prev) {
|
||||
if (prev != NULL) {
|
||||
prev->next = entry->next;
|
||||
} else {
|
||||
SDL_generic_TLS = entry->next;
|
||||
@@ -180,7 +180,7 @@ int SDL_Generic_SetTLSData(SDL_TLSData *storage)
|
||||
entry = (SDL_TLSEntry *)SDL_malloc(sizeof(*entry));
|
||||
if (entry) {
|
||||
entry->thread = thread;
|
||||
entry->storage = storage;
|
||||
entry->storage = data;
|
||||
entry->next = SDL_generic_TLS;
|
||||
SDL_generic_TLS = entry;
|
||||
}
|
||||
|
Reference in New Issue
Block a user