mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 12:41:00 +00:00
Reduce size of some char variables and get rid of some implicit memsets
This commit is contained in:
parent
c1b59df7ae
commit
f017593501
@ -1283,7 +1283,9 @@ static void config_set_defaults(void)
|
|||||||
|
|
||||||
if (!string_is_empty(g_defaults.dir.osk_overlay))
|
if (!string_is_empty(g_defaults.dir.osk_overlay))
|
||||||
{
|
{
|
||||||
char temp_path[PATH_MAX_LENGTH] = {0};
|
char temp_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
temp_path[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_expand_special(temp_path,
|
fill_pathname_expand_special(temp_path,
|
||||||
g_defaults.dir.osk_overlay, sizeof(temp_path));
|
g_defaults.dir.osk_overlay, sizeof(temp_path));
|
||||||
@ -1299,7 +1301,9 @@ static void config_set_defaults(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char temp_path[PATH_MAX_LENGTH] = {0};
|
char temp_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
temp_path[0] = '\0';
|
||||||
|
|
||||||
strlcpy(temp_path,
|
strlcpy(temp_path,
|
||||||
settings->directory.overlay,
|
settings->directory.overlay,
|
||||||
@ -1708,10 +1712,10 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||||||
settings_t *settings)
|
settings_t *settings)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
char tmp_str[PATH_MAX_LENGTH];
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
bool tmp_bool = false;
|
bool tmp_bool = false;
|
||||||
char *save = NULL;
|
char *save = NULL;
|
||||||
char tmp_str[PATH_MAX_LENGTH];
|
|
||||||
unsigned msg_color = 0;
|
unsigned msg_color = 0;
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
struct config_int_setting *int_settings = NULL;
|
struct config_int_setting *int_settings = NULL;
|
||||||
@ -2265,7 +2269,9 @@ bool config_load_override(void)
|
|||||||
/* If a game override exists, add it's location to append_config_path */
|
/* If a game override exists, add it's location to append_config_path */
|
||||||
if (new_conf)
|
if (new_conf)
|
||||||
{
|
{
|
||||||
char temp_path[PATH_MAX_LENGTH] = {0};
|
char temp_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
temp_path[0] = '\0';
|
||||||
|
|
||||||
config_file_free(new_conf);
|
config_file_free(new_conf);
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@
|
|||||||
struct string_list *dir_list_new_special(const char *input_dir,
|
struct string_list *dir_list_new_special(const char *input_dir,
|
||||||
enum dir_list_type type, const char *filter)
|
enum dir_list_type type, const char *filter)
|
||||||
{
|
{
|
||||||
char ext_shaders[PATH_MAX_LENGTH];
|
char ext_shaders[255];
|
||||||
char ext_name[PATH_MAX_LENGTH];
|
char ext_name[255];
|
||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
const char *exts = NULL;
|
const char *exts = NULL;
|
||||||
bool include_dirs = false;
|
bool include_dirs = false;
|
||||||
|
@ -247,7 +247,7 @@ bool playlist_push(playlist_t *playlist,
|
|||||||
{
|
{
|
||||||
if (string_is_empty(core_name) && !string_is_empty(core_path))
|
if (string_is_empty(core_name) && !string_is_empty(core_path))
|
||||||
{
|
{
|
||||||
static char base_path[PATH_MAX_LENGTH] = {0};
|
static char base_path[255] = {0};
|
||||||
fill_pathname_base_noext(base_path, core_path, sizeof(base_path));
|
fill_pathname_base_noext(base_path, core_path, sizeof(base_path));
|
||||||
core_name = base_path;
|
core_name = base_path;
|
||||||
RARCH_LOG("core_name is now: %s\n", core_name);
|
RARCH_LOG("core_name is now: %s\n", core_name);
|
||||||
|
@ -228,7 +228,7 @@ static void retroarch_print_features(void)
|
|||||||
|
|
||||||
static void retroarch_print_version(void)
|
static void retroarch_print_version(void)
|
||||||
{
|
{
|
||||||
char str[PATH_MAX_LENGTH];
|
char str[255];
|
||||||
|
|
||||||
str[0] = '\0';
|
str[0] = '\0';
|
||||||
|
|
||||||
@ -1026,7 +1026,7 @@ bool retroarch_main_init(int argc, char *argv[])
|
|||||||
|
|
||||||
if (verbosity_is_enabled())
|
if (verbosity_is_enabled())
|
||||||
{
|
{
|
||||||
char str[PATH_MAX_LENGTH];
|
char str[255];
|
||||||
|
|
||||||
str[0] = '\0';
|
str[0] = '\0';
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ static bool runloop_cmd_get_state_menu_toggle_button_combo(
|
|||||||
**/
|
**/
|
||||||
static bool rarch_game_specific_options(char **output)
|
static bool rarch_game_specific_options(char **output)
|
||||||
{
|
{
|
||||||
char game_path[PATH_MAX_LENGTH];
|
char game_path[255];
|
||||||
|
|
||||||
game_path[0] ='\0';
|
game_path[0] ='\0';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user