From 118d8bde98db21076b667a1b55126d0e37724278 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 14 Jun 2019 04:46:25 +0200 Subject: [PATCH] (task_netplay_find_content) Cleanups --- tasks/task_netplay_find_content.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index d4afde919d..bd026a5552 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -169,9 +169,7 @@ static void finish_task(retro_task_t *task, const char *title) task_set_finished(task, true); } -static bool core_requires_content(netplay_crc_handle_t *state) { - return string_is_not_equal(state->content_path, "N/A"); -} +#define core_requires_content(state) string_is_not_equal(state->content_path, "N/A") /** * Given a path to a content file, return the base name without the @@ -179,9 +177,10 @@ static bool core_requires_content(netplay_crc_handle_t *state) { * * e.g. /home/user/foo.rom => foo */ -static void get_entry(char *entry, int len, const char *path) { +static void get_entry(char *entry, int len, const char *path) +{ const char *buf = path_basename(path); - entry[0] = '\0'; + entry[0] = '\0'; strlcpy(entry, buf, len); path_remove_extension(entry);