mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 07:28:30 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -27,7 +27,7 @@ int SDL_ListAdd(SDL_ListNode **head, void *ent)
|
||||
{
|
||||
SDL_ListNode *node = SDL_malloc(sizeof(*node));
|
||||
|
||||
if (node == NULL) {
|
||||
if (!node) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ void SDL_ListPop(SDL_ListNode **head, void **ent)
|
||||
SDL_ListNode **ptr = head;
|
||||
|
||||
/* Invalid or empty */
|
||||
if (head == NULL || *head == NULL) {
|
||||
if (!head || !*head) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user