mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-26 20:55:39 +00:00
(config_file) Cleanups
This commit is contained in:
parent
4f29bef56e
commit
a954118faf
@ -649,23 +649,14 @@ bool config_append_file(config_file_t *conf, const char *path)
|
||||
config_file_t *config_file_new_from_string(char *from_string,
|
||||
const char *path)
|
||||
{
|
||||
char *lines = from_string;
|
||||
char *save_ptr = NULL;
|
||||
char *line = NULL;
|
||||
struct config_file *conf = (struct config_file*)malloc(sizeof(*conf));
|
||||
char *lines = from_string;
|
||||
char *save_ptr = NULL;
|
||||
char *line = NULL;
|
||||
struct config_file *conf = NULL;
|
||||
|
||||
if (!conf)
|
||||
if (!(conf = config_file_new_alloc()))
|
||||
return NULL;
|
||||
|
||||
conf->path = NULL;
|
||||
conf->entries = NULL;
|
||||
conf->tail = NULL;
|
||||
conf->last = NULL;
|
||||
conf->includes = NULL;
|
||||
conf->include_depth = 0;
|
||||
conf->guaranteed_no_duplicates = false;
|
||||
conf->modified = false;
|
||||
|
||||
if (!string_is_empty(path))
|
||||
conf->path = strdup(path);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user