Start using return values of fill_pathname_ functions
This commit is contained in:
parent
6d8bc91220
commit
1ed38ddb2d
|
@ -972,6 +972,7 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
|||
|| (string_is_equal(entry.label, "loadstate"))
|
||||
|| (string_is_equal(entry.label, "savestate"))))
|
||||
{
|
||||
size_t buf_pos = 0;
|
||||
size_t path_size = 8204 * sizeof(char);
|
||||
char *path = (char*)malloc(path_size);
|
||||
global_t *global = global_get_ptr();
|
||||
|
@ -983,16 +984,16 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
|||
int state_slot = settings->ints.state_slot;
|
||||
|
||||
if (state_slot > 0)
|
||||
snprintf(path, path_size, "%s%d",
|
||||
buf_pos = snprintf(path, path_size, "%s%d",
|
||||
global->name.savestate, state_slot);
|
||||
else if (state_slot < 0)
|
||||
fill_pathname_join_delim(path,
|
||||
buf_pos = fill_pathname_join_delim(path,
|
||||
global->name.savestate, "auto", '.', path_size);
|
||||
else
|
||||
strlcpy(path, global->name.savestate, path_size);
|
||||
buf_pos = strlcpy(path, global->name.savestate, path_size);
|
||||
}
|
||||
|
||||
strlcat(path, ".png", path_size);
|
||||
STRLCAT_CONST_INCR(path, buf_pos, ".png", path_size);
|
||||
|
||||
if (path_is_valid(path))
|
||||
{
|
||||
|
|
|
@ -706,8 +706,8 @@ void playlist_resolve_path(enum playlist_file_mode mode,
|
|||
* correctly. The path can be abbreviated if saving to
|
||||
* a playlist from another playlist (ex: content history to favorites)
|
||||
*/
|
||||
char tmp2[PATH_MAX_LENGTH];
|
||||
fill_pathname_expand_special(tmp, path, sizeof(tmp));
|
||||
char tmp2[PATH_MAX_LENGTH];
|
||||
fill_pathname_expand_special(tmp, path, sizeof(tmp));
|
||||
realpath(tmp, tmp2);
|
||||
fill_pathname_abbreviate_special(path, tmp2, size);
|
||||
}
|
||||
|
|
|
@ -273,6 +273,7 @@ runtime_log_t *runtime_log_init(const char *content_path,
|
|||
char log_file_dir[PATH_MAX_LENGTH];
|
||||
char log_file_path[PATH_MAX_LENGTH];
|
||||
char tmp_buf[PATH_MAX_LENGTH];
|
||||
size_t buf_pos = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
core_info_list_t *core_info = NULL;
|
||||
runtime_log_t *runtime_log = NULL;
|
||||
|
@ -410,8 +411,8 @@ runtime_log_t *runtime_log_init(const char *content_path,
|
|||
return NULL;
|
||||
|
||||
/* Build final log file path */
|
||||
fill_pathname_join(log_file_path, log_file_dir, content_name, sizeof(log_file_path));
|
||||
strlcat(log_file_path, ".lrtl", sizeof(log_file_path));
|
||||
buf_pos = fill_pathname_join(log_file_path, log_file_dir, content_name, sizeof(log_file_path));
|
||||
STRLCAT_CONST_INCR(log_file_path, buf_pos, ".lrtl", sizeof(log_file_path));
|
||||
|
||||
if (string_is_empty(log_file_path))
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue