From 989825f7ebcdbcf66e852d903785f20ab76b90a4 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 7 Feb 2017 03:28:15 +0100 Subject: Cleanup --- json-rpc-shell.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/json-rpc-shell.c b/json-rpc-shell.c index ee403d5..af250b9 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -1058,28 +1058,6 @@ save_configuration (struct config_item *root, const char *path_hint) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// TODO: consider moving to liberty, degesch has exactly the same function -static struct config_item * -load_configuration_file (const char *filename, struct error **e) -{ - struct config_item *root = NULL; - - struct str data; - str_init (&data); - if (!read_file (filename, &data, e)) - goto end; - - struct error *error = NULL; - if (!(root = config_item_parse (data.str, data.len, false, &error))) - { - error_set (e, "parse error: %s", error->message); - error_free (error); - } -end: - str_free (&data); - return root; -} - static void load_configuration (struct app_context *ctx) { @@ -1089,7 +1067,7 @@ load_configuration (struct app_context *ctx) return; struct error *e = NULL; - struct config_item *root = load_configuration_file (filename, &e); + struct config_item *root = config_read_from_file (filename, &e); free (filename); if (e) -- cgit v1.2.3-70-g09d2