mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(file_path) path_basedir - remove unnecessary strlcpy - add return value comment
to another function
This commit is contained in:
parent
88bdaffa87
commit
fca6015011
@ -361,6 +361,8 @@ size_t fill_pathname_dir(char *in_dir, const char *in_basename,
|
|||||||
* @size : size of output path
|
* @size : size of output path
|
||||||
*
|
*
|
||||||
* Copies basename of @in_path into @out_path.
|
* Copies basename of @in_path into @out_path.
|
||||||
|
*
|
||||||
|
* @return length of the string copied into @out
|
||||||
**/
|
**/
|
||||||
size_t fill_pathname_base(char *out, const char *in_path, size_t size)
|
size_t fill_pathname_base(char *out, const char *in_path, size_t size)
|
||||||
{
|
{
|
||||||
@ -535,7 +537,11 @@ void path_basedir(char *path)
|
|||||||
if ((last = find_last_slash(path)))
|
if ((last = find_last_slash(path)))
|
||||||
last[1] = '\0';
|
last[1] = '\0';
|
||||||
else
|
else
|
||||||
strlcpy(path, "." PATH_DEFAULT_SLASH(), 3);
|
{
|
||||||
|
path[0] = '.';
|
||||||
|
path[1] = PATH_DEFAULT_SLASH_C();
|
||||||
|
path[2] = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user