[SDL2] pointer boolean (#8523)

This commit is contained in:
Sylvain Becker
2023-11-10 15:30:56 +01:00
committed by GitHub
parent 4a3a9f3ad8
commit a14b948b6c
394 changed files with 2564 additions and 2559 deletions

View File

@@ -1152,7 +1152,7 @@ int SDL_vsscanf(const char *text, const char *fmt, va_list ap)
{
int retval = 0;
if (text == NULL || !*text) {
if (!text || !*text) {
return -1;
}
@@ -1544,7 +1544,7 @@ static size_t SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, c
size_t length = 0;
size_t slen, sz;
if (string == NULL) {
if (!string) {
string = "(null)";
}
@@ -1604,7 +1604,7 @@ static void SDL_IntPrecisionAdjust(char *num, size_t maxlen, SDL_FormatInfo *inf
{ /* left-pad num with zeroes. */
size_t sz, pad, have_sign;
if (info == NULL) {
if (!info) {
return;
}
@@ -1992,7 +1992,7 @@ int SDL_vasprintf(char **strp, const char *fmt, va_list ap)
*strp = NULL;
p = (char *)SDL_malloc(size);
if (p == NULL) {
if (!p) {
return -1;
}
@@ -2018,7 +2018,7 @@ int SDL_vasprintf(char **strp, const char *fmt, va_list ap)
size = retval + 1; /* Precisely what is needed */
np = (char *)SDL_realloc(p, size);
if (np == NULL) {
if (!np) {
SDL_free(p);
return -1;
} else {