Christoph Mallon: Remove pointless if (x) before SDL_free(x)
This commit is contained in:
parent
edc88be724
commit
08dfaaa2e6
63 changed files with 157 additions and 349 deletions
|
@ -72,9 +72,7 @@ SDL_SetHintWithPriority(const char *name, const char *value,
|
|||
entry->callback(entry->userdata, name, hint->value, value);
|
||||
entry = next;
|
||||
}
|
||||
if (hint->value) {
|
||||
SDL_free(hint->value);
|
||||
}
|
||||
SDL_free(hint->value);
|
||||
hint->value = value ? SDL_strdup(value) : NULL;
|
||||
}
|
||||
hint->priority = priority;
|
||||
|
@ -206,9 +204,7 @@ void SDL_ClearHints(void)
|
|||
SDL_hints = hint->next;
|
||||
|
||||
SDL_free(hint->name);
|
||||
if (hint->value) {
|
||||
SDL_free(hint->value);
|
||||
}
|
||||
SDL_free(hint->value);
|
||||
for (entry = hint->callbacks; entry; ) {
|
||||
SDL_HintWatch *freeable = entry;
|
||||
entry = entry->next;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue