mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Optimize some strlen and file_path_str usage - condense this
back to STRLEN_CONST usage
This commit is contained in:
parent
c1c3f75804
commit
6e015d32a8
1 changed files with 7 additions and 6 deletions
|
@ -153,9 +153,9 @@ void cb_net_generic_subdir(retro_task_t *task,
|
|||
|
||||
finish:
|
||||
if (!err && !string_ends_with_size(subdir_path,
|
||||
file_path_str(FILE_PATH_INDEX_DIRS_URL),
|
||||
".index-dirs",
|
||||
strlen(subdir_path),
|
||||
strlen(file_path_str(FILE_PATH_INDEX_DIRS_URL))
|
||||
STRLEN_CONST(".index-dirs")
|
||||
))
|
||||
{
|
||||
char parent_dir[PATH_MAX_LENGTH];
|
||||
|
@ -225,9 +225,9 @@ finish:
|
|||
|
||||
if (!err &&
|
||||
!string_ends_with_size(state->path,
|
||||
file_path_str(FILE_PATH_INDEX_DIRS_URL),
|
||||
".index-dirs",
|
||||
strlen(state->path),
|
||||
strlen(file_path_str(FILE_PATH_INDEX_DIRS_URL))
|
||||
STRLEN_CONST(".index-dirs")
|
||||
))
|
||||
{
|
||||
char *parent_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
@ -238,9 +238,10 @@ finish:
|
|||
parent_dir_encoded[0] = '\0';
|
||||
|
||||
fill_pathname_parent_dir(parent_dir,
|
||||
state->path, PATH_MAX_LENGTH * sizeof(char));
|
||||
state->path,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
strlcat(parent_dir,
|
||||
file_path_str(FILE_PATH_INDEX_DIRS_URL),
|
||||
".index-dirs",
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
transf = (file_transfer_t*)malloc(sizeof(*transf));
|
||||
|
|
Loading…
Add table
Reference in a new issue