From 27b40337e8a95aa9af0cabe95475b3fee04c46ce Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Fri, 19 Jan 2018 22:24:49 +0000 Subject: [PATCH] Change if statements to make explicit checks Signed-off-by: Mahyar Koshkouei --- mpv-libretro.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mpv-libretro.c b/mpv-libretro.c index ef815e3..8dcbdfc 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -186,7 +186,7 @@ static void context_reset(void) mpv = mpv_create(); - if(!mpv) + if(mpv == NULL) { log_cb(RETRO_LOG_ERROR, "failed creating context\n"); exit(EXIT_FAILURE); @@ -209,7 +209,7 @@ static void context_reset(void) */ mpv_gl = mpv_get_sub_api(mpv, MPV_SUB_API_OPENGL_CB); - if(!mpv_gl) + if(mpv_gl == NULL) { log_cb(RETRO_LOG_ERROR, "failed to create mpv GL API handle\n"); exit(EXIT_FAILURE); @@ -514,7 +514,7 @@ bool retro_load_game(const struct retro_game_info *info) environ_cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, desc); /* Not bothered if this fails. Assuming the default is selected anyway. */ - if(!environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) + if(environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt) == false) { log_cb(RETRO_LOG_ERROR, "XRGB8888 is not supported.\n"); @@ -523,7 +523,7 @@ bool retro_load_game(const struct retro_game_info *info) environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt); } - if(!retro_init_hw_context()) + if(retro_init_hw_context() == false) { log_cb(RETRO_LOG_ERROR, "HW Context could not be initialized\n"); return false;