yml: yml_load(): optionally allocates an error string (on error)

This commit is contained in:
Daniel Eklöf 2019-01-01 23:25:36 +01:00
parent 3dc7d0e39d
commit 5abd825137
3 changed files with 24 additions and 8 deletions

3
main.c
View file

@ -62,7 +62,8 @@ main(int argc, const char *const *argv)
if (conf_file == NULL)
return 1;
struct yml_node *conf = yml_load(conf_file);
char *yml_error;
struct yml_node *conf = yml_load(conf_file, &yml_error);
fclose(conf_file);
if (conf == NULL)