From 1592452cad7f99a45d44956562e5663b23ceb82b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 16 Jul 2024 14:25:53 -0400 Subject: [PATCH] video: Fixed remaining `return 0` to use NULL in CreateDevice implementations. --- src/video/emscripten/SDL_emscriptenvideo.c | 2 +- src/video/n3ds/SDL_n3dsvideo.c | 2 +- src/video/ngage/SDL_ngagevideo.cpp | 4 ++-- src/video/ps2/SDL_ps2video.c | 2 +- src/video/riscos/SDL_riscosvideo.c | 2 +- src/video/winrt/SDL_winrtvideo.cpp | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/video/emscripten/SDL_emscriptenvideo.c b/src/video/emscripten/SDL_emscriptenvideo.c index 1ab7391aec..86fd050b47 100644 --- a/src/video/emscripten/SDL_emscriptenvideo.c +++ b/src/video/emscripten/SDL_emscriptenvideo.c @@ -62,7 +62,7 @@ static SDL_VideoDevice *Emscripten_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { - return 0; + return NULL; } /* Firefox sends blur event which would otherwise prevent full screen diff --git a/src/video/n3ds/SDL_n3dsvideo.c b/src/video/n3ds/SDL_n3dsvideo.c index 1c1f43204a..7f7d5a2a9c 100644 --- a/src/video/n3ds/SDL_n3dsvideo.c +++ b/src/video/n3ds/SDL_n3dsvideo.c @@ -79,7 +79,7 @@ static SDL_VideoDevice *N3DS_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { - return 0; + return NULL; } /* Initialize internal data */ diff --git a/src/video/ngage/SDL_ngagevideo.cpp b/src/video/ngage/SDL_ngagevideo.cpp index a543494c58..532403eeaf 100644 --- a/src/video/ngage/SDL_ngagevideo.cpp +++ b/src/video/ngage/SDL_ngagevideo.cpp @@ -105,14 +105,14 @@ static SDL_VideoDevice *NGAGE_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { - return 0; + return NULL; } /* Initialize internal N-Gage specific data */ phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (!phdata) { SDL_free(device); - return 0; + return NULL; } /* General video */ diff --git a/src/video/ps2/SDL_ps2video.c b/src/video/ps2/SDL_ps2video.c index cb29cf0015..e470f3ccb7 100644 --- a/src/video/ps2/SDL_ps2video.c +++ b/src/video/ps2/SDL_ps2video.c @@ -96,7 +96,7 @@ static SDL_VideoDevice *PS2_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { - return 0; + return NULL; } /* Set the function pointers */ diff --git a/src/video/riscos/SDL_riscosvideo.c b/src/video/riscos/SDL_riscosvideo.c index bb4c1c2220..a4d2208e7d 100644 --- a/src/video/riscos/SDL_riscosvideo.c +++ b/src/video/riscos/SDL_riscosvideo.c @@ -58,7 +58,7 @@ static SDL_VideoDevice *RISCOS_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { - return 0; + return NULL; } /* Initialize internal data */ diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp index 3e06e852dc..03d3194b09 100644 --- a/src/video/winrt/SDL_winrtvideo.cpp +++ b/src/video/winrt/SDL_winrtvideo.cpp @@ -108,13 +108,13 @@ static SDL_VideoDevice *WINRT_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { - return 0; + return NULL; } data = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); if (!data) { SDL_free(device); - return 0; + return NULL; } device->driverdata = data;