[iortcw] 376/497: All: SDL_Init zero check

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit e076101ddf0b6b869ff5442b636af61f87ffb7ac
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Sun Jul 26 06:18:04 2015 -0400

    All: SDL_Init zero check
---
 MP/code/sdl/sdl_glimp.c | 2 +-
 MP/code/sdl/sdl_input.c | 2 +-
 MP/code/sdl/sdl_snd.c   | 2 +-
 SP/code/sdl/sdl_glimp.c | 2 +-
 SP/code/sdl/sdl_input.c | 2 +-
 SP/code/sdl/sdl_snd.c   | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/MP/code/sdl/sdl_glimp.c b/MP/code/sdl/sdl_glimp.c
index f92aa4c..ba1f8f0 100644
--- a/MP/code/sdl/sdl_glimp.c
+++ b/MP/code/sdl/sdl_glimp.c
@@ -574,7 +574,7 @@ static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qbool
 	{
 		const char *driverName;
 
-		if (SDL_Init(SDL_INIT_VIDEO) == -1)
+		if (SDL_Init(SDL_INIT_VIDEO) != 0)
 		{
 			ri.Printf( PRINT_ALL, "SDL_Init( SDL_INIT_VIDEO ) FAILED (%s)\n", SDL_GetError());
 			return qfalse;
diff --git a/MP/code/sdl/sdl_input.c b/MP/code/sdl/sdl_input.c
index d6c4df0..a20dbd3 100644
--- a/MP/code/sdl/sdl_input.c
+++ b/MP/code/sdl/sdl_input.c
@@ -437,7 +437,7 @@ static void IN_InitJoystick( void )
 	if (!SDL_WasInit(SDL_INIT_JOYSTICK))
 	{
 		Com_DPrintf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n");
-		if (SDL_Init(SDL_INIT_JOYSTICK) == -1)
+		if (SDL_Init(SDL_INIT_JOYSTICK) != 0)
 		{
 			Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError());
 			return;
diff --git a/MP/code/sdl/sdl_snd.c b/MP/code/sdl/sdl_snd.c
index 710c036..609aed9 100644
--- a/MP/code/sdl/sdl_snd.c
+++ b/MP/code/sdl/sdl_snd.c
@@ -156,7 +156,7 @@ qboolean SNDDMA_Init(void)
 
 	if (!SDL_WasInit(SDL_INIT_AUDIO))
 	{
-		if (SDL_Init(SDL_INIT_AUDIO) == -1)
+		if (SDL_Init(SDL_INIT_AUDIO) != 0)
 		{
 			Com_Printf( "FAILED (%s)\n", SDL_GetError( ) );
 			return qfalse;
diff --git a/SP/code/sdl/sdl_glimp.c b/SP/code/sdl/sdl_glimp.c
index f92aa4c..ba1f8f0 100644
--- a/SP/code/sdl/sdl_glimp.c
+++ b/SP/code/sdl/sdl_glimp.c
@@ -574,7 +574,7 @@ static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qbool
 	{
 		const char *driverName;
 
-		if (SDL_Init(SDL_INIT_VIDEO) == -1)
+		if (SDL_Init(SDL_INIT_VIDEO) != 0)
 		{
 			ri.Printf( PRINT_ALL, "SDL_Init( SDL_INIT_VIDEO ) FAILED (%s)\n", SDL_GetError());
 			return qfalse;
diff --git a/SP/code/sdl/sdl_input.c b/SP/code/sdl/sdl_input.c
index d6c4df0..a20dbd3 100644
--- a/SP/code/sdl/sdl_input.c
+++ b/SP/code/sdl/sdl_input.c
@@ -437,7 +437,7 @@ static void IN_InitJoystick( void )
 	if (!SDL_WasInit(SDL_INIT_JOYSTICK))
 	{
 		Com_DPrintf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n");
-		if (SDL_Init(SDL_INIT_JOYSTICK) == -1)
+		if (SDL_Init(SDL_INIT_JOYSTICK) != 0)
 		{
 			Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError());
 			return;
diff --git a/SP/code/sdl/sdl_snd.c b/SP/code/sdl/sdl_snd.c
index 710c036..609aed9 100644
--- a/SP/code/sdl/sdl_snd.c
+++ b/SP/code/sdl/sdl_snd.c
@@ -156,7 +156,7 @@ qboolean SNDDMA_Init(void)
 
 	if (!SDL_WasInit(SDL_INIT_AUDIO))
 	{
-		if (SDL_Init(SDL_INIT_AUDIO) == -1)
+		if (SDL_Init(SDL_INIT_AUDIO) != 0)
 		{
 			Com_Printf( "FAILED (%s)\n", SDL_GetError( ) );
 			return qfalse;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list