mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
Prevent more implicit memsets
This commit is contained in:
parent
a9ce430ed6
commit
ad465cc5a4
@ -2200,10 +2200,10 @@ end:
|
|||||||
*/
|
*/
|
||||||
bool config_load_override(void)
|
bool config_load_override(void)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX_LENGTH] = {0};
|
char buf[PATH_MAX_LENGTH];
|
||||||
char config_directory[PATH_MAX_LENGTH] = {0};
|
char config_directory[PATH_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH] = {0};
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char game_path[PATH_MAX_LENGTH] = {0};
|
char game_path[PATH_MAX_LENGTH];
|
||||||
config_file_t *new_conf = NULL;
|
config_file_t *new_conf = NULL;
|
||||||
const char *core_name = NULL;
|
const char *core_name = NULL;
|
||||||
const char *game_name = NULL;
|
const char *game_name = NULL;
|
||||||
@ -2219,6 +2219,8 @@ bool config_load_override(void)
|
|||||||
if (string_is_empty(core_name) || string_is_empty(game_name))
|
if (string_is_empty(core_name) || string_is_empty(game_name))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
config_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_application_special(config_directory, sizeof(config_directory),
|
fill_pathname_application_special(config_directory, sizeof(config_directory),
|
||||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||||
|
|
||||||
@ -2283,6 +2285,7 @@ bool config_load_override(void)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Re-load the configuration with any overrides that might have been found */
|
/* Re-load the configuration with any overrides that might have been found */
|
||||||
|
buf[0] = '\0';
|
||||||
|
|
||||||
/* Store the libretro_path we're using since it will be
|
/* Store the libretro_path we're using since it will be
|
||||||
* overwritten by the override when reloading. */
|
* overwritten by the override when reloading. */
|
||||||
@ -3059,6 +3062,10 @@ bool config_save_file(const char *path)
|
|||||||
**/
|
**/
|
||||||
bool config_save_overrides(int override_type)
|
bool config_save_overrides(int override_type)
|
||||||
{
|
{
|
||||||
|
char config_directory[PATH_MAX_LENGTH];
|
||||||
|
char override_directory[PATH_MAX_LENGTH];
|
||||||
|
char core_path[PATH_MAX_LENGTH];
|
||||||
|
char game_path[PATH_MAX_LENGTH];
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
int bool_settings_size = 0;
|
int bool_settings_size = 0;
|
||||||
int int_settings_size = 0;
|
int int_settings_size = 0;
|
||||||
@ -3066,10 +3073,6 @@ bool config_save_overrides(int override_type)
|
|||||||
int array_settings_size = 0;
|
int array_settings_size = 0;
|
||||||
int path_settings_size = 0;
|
int path_settings_size = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
char config_directory[PATH_MAX_LENGTH] = {0};
|
|
||||||
char override_directory[PATH_MAX_LENGTH] = {0};
|
|
||||||
char core_path[PATH_MAX_LENGTH] = {0};
|
|
||||||
char game_path[PATH_MAX_LENGTH] = {0};
|
|
||||||
const char *core_name = NULL;
|
const char *core_name = NULL;
|
||||||
const char *game_name = NULL;
|
const char *game_name = NULL;
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
@ -3099,6 +3102,8 @@ bool config_save_overrides(int override_type)
|
|||||||
|
|
||||||
settings = (settings_t*)calloc(1, sizeof(settings_t));
|
settings = (settings_t*)calloc(1, sizeof(settings_t));
|
||||||
|
|
||||||
|
config_directory[0] = override_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_application_special(config_directory, sizeof(config_directory),
|
fill_pathname_application_special(config_directory, sizeof(config_directory),
|
||||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user