diff --git a/core_info.c b/core_info.c index c7b1ca1113e..184a24e5eba 100644 --- a/core_info.c +++ b/core_info.c @@ -30,6 +30,9 @@ #include "config.h" #endif +static const char *core_info_tmp_path = NULL; +static const struct string_list *core_info_tmp_list = NULL; + static void core_info_list_resolve_all_extensions( core_info_list_t *core_info_list) { @@ -491,8 +494,6 @@ const char *core_info_list_get_all_extensions(void) } /* qsort_r() is not in standard C, sadly. */ -static const char *core_info_tmp_path; -static const struct string_list *core_info_tmp_list; static int core_info_qsort_cmp(const void *a_, const void *b_) { @@ -561,7 +562,7 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list, *num_infos = supported; } -core_info_t *core_info_find(core_info_list_t *list, +static core_info_t *core_info_find(core_info_list_t *list, const char *core) { size_t i; @@ -704,9 +705,7 @@ bool core_info_ctl(enum core_info_state state, void *data) case CORE_INFO_CTL_FIND: { core_info_ctx_find_t *info = (core_info_ctx_find_t*)data; - if (!info) - return false; - if (!core_info_curr_list) + if (!info || !core_info_curr_list) return false; if (!(info->inf = core_info_find(core_info_curr_list, info->path))) return false; diff --git a/core_info.h b/core_info.h index 13ba6ea95b9..213e954318e 100644 --- a/core_info.h +++ b/core_info.h @@ -118,9 +118,6 @@ bool core_info_list_get_info(core_info_list_t *list, const char *core_info_list_get_all_extensions(void); -core_info_t *core_info_find(core_info_list_t *list, - const char *core); - bool core_info_list_get_display_name(core_info_list_t *list, const char *path, char *buf, size_t size);