From b2426f30a65639d66902b2014807d8454fc393a6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 19 Jan 2016 22:39:48 +0100 Subject: [PATCH] (content.c) Start using string_is_empty --- content.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content.c b/content.c index 46eba3d249..b31cc7aed8 100644 --- a/content.c +++ b/content.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -427,8 +428,7 @@ static bool load_content_from_compressed_archive( strlcpy(new_basedir, settings->cache_directory, sizeof(new_basedir)); - if ((!strcmp(new_basedir, "")) || - !path_is_directory(new_basedir)) + if (string_is_empty(new_basedir) || !path_is_directory(new_basedir)) { RARCH_WARN("Tried extracting to cache directory, but " "cache directory was not set or found. " @@ -442,7 +442,7 @@ static bool load_content_from_compressed_archive( fill_pathname_join(new_path, new_basedir, path_basename(path), sizeof(new_path)); - ret = read_compressed_file(path,NULL,new_path, &len); + ret = read_compressed_file(path, NULL, new_path, &len); if (!ret || len < 0) { @@ -493,7 +493,7 @@ static bool load_content( bool need_fullpath = attr & 2; bool require_content = attr & 4; - if (require_content && !*path) + if (require_content && string_is_empty(path)) { RARCH_LOG("libretro core requires content, but nothing was provided.\n"); return false; @@ -504,7 +504,7 @@ static bool load_content( if (*path) info[i].path = path; - if (!need_fullpath && *path) + if (!need_fullpath && !string_is_empty(path)) { if (!load_content_into_memory(&info[i], i, path)) return false;