We don't need the double char variable here
This commit is contained in:
parent
419fe62da8
commit
60574f04d2
|
@ -169,19 +169,14 @@ void fill_pathname_application_special(char *s,
|
||||||
#ifdef HAVE_XMB
|
#ifdef HAVE_XMB
|
||||||
{
|
{
|
||||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
|
||||||
|
|
||||||
s1[0] = s2[0] = '\0';
|
s1[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_application_special(s1,
|
fill_pathname_application_special(s1,
|
||||||
PATH_MAX_LENGTH * sizeof(char),
|
PATH_MAX_LENGTH * sizeof(char),
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB);
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB);
|
||||||
fill_pathname_join(s2, s1, "png",
|
fill_pathname_join(s, s1, "png", len);
|
||||||
PATH_MAX_LENGTH * sizeof(char)
|
|
||||||
);
|
|
||||||
strlcpy(s, s2, len);
|
|
||||||
free(s1);
|
free(s1);
|
||||||
free(s2);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -277,10 +272,9 @@ void fill_pathname_application_special(char *s,
|
||||||
#ifdef HAVE_XMB
|
#ifdef HAVE_XMB
|
||||||
{
|
{
|
||||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
s1[0] = s2[0] = '\0';
|
s1[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_join(
|
fill_pathname_join(
|
||||||
s1,
|
s1,
|
||||||
|
@ -288,13 +282,9 @@ void fill_pathname_application_special(char *s,
|
||||||
"xmb",
|
"xmb",
|
||||||
PATH_MAX_LENGTH * sizeof(char)
|
PATH_MAX_LENGTH * sizeof(char)
|
||||||
);
|
);
|
||||||
fill_pathname_join(s2,
|
fill_pathname_join(s,
|
||||||
s1, xmb_theme_ident(),
|
s1, xmb_theme_ident(), len);
|
||||||
PATH_MAX_LENGTH * sizeof(char)
|
|
||||||
);
|
|
||||||
strlcpy(s, s2, len);
|
|
||||||
free(s1);
|
free(s1);
|
||||||
free(s2);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -370,45 +360,35 @@ void fill_pathname_application_special(char *s,
|
||||||
break;
|
break;
|
||||||
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS:
|
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS:
|
||||||
{
|
{
|
||||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
settings_t *settings = config_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
s1[0] = s2[0] = '\0';
|
s1[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_join(s1,
|
fill_pathname_join(s1,
|
||||||
settings->paths.directory_thumbnails,
|
settings->paths.directory_thumbnails,
|
||||||
"discord",
|
"discord",
|
||||||
len);
|
len);
|
||||||
fill_pathname_join(s2,
|
fill_pathname_join(s,
|
||||||
s1, "avatars",
|
s1, "avatars", len);
|
||||||
PATH_MAX_LENGTH * sizeof(char)
|
|
||||||
);
|
|
||||||
strlcpy(s, s2, len);
|
|
||||||
free(s1);
|
free(s1);
|
||||||
free(s2);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES:
|
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES:
|
||||||
{
|
{
|
||||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
settings_t *settings = config_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
s1[0] = s2[0] = '\0';
|
s1[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_join(s1,
|
fill_pathname_join(s1,
|
||||||
settings->paths.directory_thumbnails,
|
settings->paths.directory_thumbnails,
|
||||||
"cheevos",
|
"cheevos",
|
||||||
len);
|
len);
|
||||||
fill_pathname_join(s2,
|
fill_pathname_join(s,
|
||||||
s1, "badges",
|
s1, "badges", len);
|
||||||
PATH_MAX_LENGTH * sizeof(char)
|
|
||||||
);
|
|
||||||
strlcpy(s, s2, len);
|
|
||||||
free(s1);
|
free(s1);
|
||||||
free(s2);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue