From cd0d5a5fc58a195f15c02a96f67fd55c4a60974b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 17 Nov 2022 11:23:15 +0100 Subject: [PATCH] Don't compare pointer against '0', but NULL --- src/stdlib/SDL_qsort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stdlib/SDL_qsort.c b/src/stdlib/SDL_qsort.c index b0f92fde8..d17b6a31c 100644 --- a/src/stdlib/SDL_qsort.c +++ b/src/stdlib/SDL_qsort.c @@ -414,7 +414,7 @@ static void qsort_nonaligned(void *base, size_t nmemb, size_t size, char *first,*last; char *pivot=malloc(size); size_t trunc=TRUNC_nonaligned*size; - assert(pivot); + assert(pivot != NULL); first=(char*)base; last=first+(nmemb-1)*size; @@ -445,7 +445,7 @@ static void qsort_aligned(void *base, size_t nmemb, size_t size, char *first,*last; char *pivot=malloc(size); size_t trunc=TRUNC_aligned*size; - assert(pivot); + assert(pivot != NULL); first=(char*)base; last=first+(nmemb-1)*size; @@ -475,7 +475,7 @@ static void qsort_words(void *base, size_t nmemb, int stacktop=0; char *first,*last; char *pivot=malloc(WORD_BYTES); - assert(pivot); + assert(pivot != NULL); first=(char*)base; last=first+(nmemb-1)*WORD_BYTES;