(core_options.c) Cleanups

This commit is contained in:
twinaphex 2015-06-12 23:16:42 +02:00
parent 8b748f13ca
commit 8fb9ce1b17
1 changed files with 8 additions and 5 deletions

View File

@ -88,8 +88,10 @@ static bool parse_variable(core_option_manager_t *opt, size_t idx,
const struct retro_variable *var) const struct retro_variable *var)
{ {
size_t i; size_t i;
const char *val_start; const char *val_start = NULL;
char *value, *desc_end, *config_val = NULL; char *value = NULL;
char *desc_end = NULL;
char *config_val = NULL;
struct core_option *option = (struct core_option*)&opt->opts[idx]; struct core_option *option = (struct core_option*)&opt->opts[idx];
if (!option) if (!option)
@ -152,6 +154,7 @@ core_option_manager_t *core_option_new(const char *conf_path,
size_t size = 0; size_t size = 0;
core_option_manager_t *opt = (core_option_manager_t*) core_option_manager_t *opt = (core_option_manager_t*)
calloc(1, sizeof(*opt)); calloc(1, sizeof(*opt));
if (!opt) if (!opt)
return NULL; return NULL;
@ -173,8 +176,8 @@ core_option_manager_t *core_option_new(const char *conf_path,
goto error; goto error;
opt->size = size; opt->size = size;
size = 0; size = 0;
for (var = vars; var->key && var->value; size++, var++) for (var = vars; var->key && var->value; size++, var++)
{ {
if (!parse_variable(opt, size, var)) if (!parse_variable(opt, size, var))