mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-24 15:02:00 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
parent
4a3a9f3ad8
commit
a14b948b6c
394 changed files with 2564 additions and 2559 deletions
|
|
@ -173,7 +173,7 @@ static int SDLCALL SDL_TimerThread(void *_data)
|
|||
current->scheduled = tick + interval;
|
||||
SDL_AddTimerInternal(data, current);
|
||||
} else {
|
||||
if (freelist_head == NULL) {
|
||||
if (!freelist_head) {
|
||||
freelist_head = current;
|
||||
}
|
||||
if (freelist_tail) {
|
||||
|
|
@ -298,7 +298,7 @@ SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *para
|
|||
SDL_RemoveTimer(timer->timerID);
|
||||
} else {
|
||||
timer = (SDL_Timer *)SDL_malloc(sizeof(*timer));
|
||||
if (timer == NULL) {
|
||||
if (!timer) {
|
||||
SDL_OutOfMemory();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -311,7 +311,7 @@ SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *para
|
|||
SDL_AtomicSet(&timer->canceled, 0);
|
||||
|
||||
entry = (SDL_TimerMap *)SDL_malloc(sizeof(*entry));
|
||||
if (entry == NULL) {
|
||||
if (!entry) {
|
||||
SDL_free(timer);
|
||||
SDL_OutOfMemory();
|
||||
return 0;
|
||||
|
|
@ -424,7 +424,7 @@ SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *para
|
|||
SDL_TimerMap *entry;
|
||||
|
||||
entry = (SDL_TimerMap *)SDL_malloc(sizeof(*entry));
|
||||
if (entry == NULL) {
|
||||
if (!entry) {
|
||||
SDL_OutOfMemory();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue