From d99fac1d887794b7132bc66c06ce50f0b60e110a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 19 Dec 2016 18:30:17 +0100 Subject: [PATCH] Get rid of some implicit memsets --- menu/menu_displaylist.c | 2 +- menu/menu_setting.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6a283987e9..e7b5e101d6 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3529,7 +3529,7 @@ static void menu_displaylist_parse_playlist_associations( { char path_base[PATH_MAX_LENGTH]; char core_path[PATH_MAX_LENGTH]; - unsigned found = 0; + unsigned found = 0; union string_list_elem_attr attr = {0}; const char *path = path_basename(str_list->elems[i].data); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 549e66838b..dfe9ad254f 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1895,7 +1895,7 @@ static bool setting_append_list_input_player_options( parent_group); { - char tmp_string[PATH_MAX_LENGTH] = {0}; + char tmp_string[PATH_MAX_LENGTH]; /* These constants match the string lengths. * Keep them up to date or you'll get some really obvious bugs. * 2 is the length of '99'; we don't need more users than that. @@ -1915,6 +1915,8 @@ static bool setting_append_list_input_player_options( static char label_bind_all_save_autoconfig[MAX_USERS][64]; static char label_bind_defaults[MAX_USERS][64]; + tmp_string[0] = '\0'; + snprintf(tmp_string, sizeof(tmp_string), "input_player%u", user + 1); fill_pathname_join_delim(key[user], tmp_string, "joypad_index", '_',