mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Cleanups
This commit is contained in:
parent
91f5ca4105
commit
2f235f0abb
@ -380,16 +380,10 @@ static bool parse_line(config_file_t *conf,
|
||||
{
|
||||
size_t cur_size = 32;
|
||||
size_t idx = 0;
|
||||
char *comment = NULL;
|
||||
char *key = NULL;
|
||||
char *key_tmp = NULL;
|
||||
|
||||
/* Ignore empty lines */
|
||||
if (string_is_empty(line))
|
||||
return false;
|
||||
|
||||
/* Remove any comment text */
|
||||
comment = strip_comment(line);
|
||||
char *comment = strip_comment(line);
|
||||
|
||||
/* Check whether entire line is a comment */
|
||||
if (comment)
|
||||
@ -529,7 +523,9 @@ static config_file_t *config_file_new_internal(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*line && parse_line(conf, list, line, cb))
|
||||
if (*line
|
||||
&& !string_is_empty(line)
|
||||
&& parse_line(conf, list, line, cb))
|
||||
{
|
||||
if (conf->entries)
|
||||
conf->tail->next = list;
|
||||
@ -664,7 +660,9 @@ config_file_t *config_file_new_from_string(char *from_string,
|
||||
list->next = NULL;
|
||||
|
||||
/* Parse current line */
|
||||
if (*line && parse_line(conf, list, line, NULL))
|
||||
if (*line
|
||||
&& !string_is_empty(line)
|
||||
&& parse_line(conf, list, line, NULL))
|
||||
{
|
||||
if (conf->entries)
|
||||
conf->tail->next = list;
|
||||
|
Loading…
x
Reference in New Issue
Block a user