From f6bbe69096ede615a70730117c77738e2af89d78 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 26 Jun 2016 10:33:46 +0200 Subject: [PATCH] Use string_is_empty --- retroarch.c | 12 +++++++----- runloop.c | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/retroarch.c b/retroarch.c index 2728829e4a..70fd6a1b48 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1098,7 +1098,7 @@ static void retroarch_init_savefile_paths(void) global->savefiles = string_list_new(); retro_assert(global->savefiles); - if (system && *global->subsystem) + if (system && !string_is_empty(global->subsystem)) { /* For subsystems, we know exactly which RAM types are supported. */ @@ -1558,16 +1558,18 @@ void retroarch_fill_pathnames(void) retroarch_init_savefile_paths(); bsv_movie_set_path(global->name.savefile); - if (!*global->name.base) + if (string_is_empty(global->name.base)) return; - if (!*global->name.ups) + if (string_is_empty(global->name.ups)) fill_pathname_noext(global->name.ups, global->name.base, ".ups", sizeof(global->name.ups)); - if (!*global->name.bps) + + if (string_is_empty(global->name.bps)) fill_pathname_noext(global->name.bps, global->name.base, ".bps", sizeof(global->name.bps)); - if (!*global->name.ips) + + if (string_is_empty(global->name.ips)) fill_pathname_noext(global->name.ips, global->name.base, ".ips", sizeof(global->name.ips)); } diff --git a/runloop.c b/runloop.c index 7b85bf4044..4013ae4650 100644 --- a/runloop.c +++ b/runloop.c @@ -1118,7 +1118,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) const struct retro_variable *vars = (const struct retro_variable*)data; - if (!*options_path && *global->path.config) + if (string_is_empty(options_path) && *global->path.config) { fill_pathname_resolve_relative(buf, global->path.config, file_path_str(FILE_PATH_CORE_OPTIONS_CONFIG), sizeof(buf));