aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-02-07 03:28:15 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-02-07 03:28:15 +0100
commit989825f7ebcdbcf66e852d903785f20ab76b90a4 (patch)
treeab7375fbb76f14934bf5657a608ff48a1b6dca45
parentc03af00e300b6f70d88118ebd1f56c2421efe20f (diff)
downloadjson-rpc-shell-989825f7ebcdbcf66e852d903785f20ab76b90a4.tar.gz
json-rpc-shell-989825f7ebcdbcf66e852d903785f20ab76b90a4.tar.xz
json-rpc-shell-989825f7ebcdbcf66e852d903785f20ab76b90a4.zip
Cleanup
-rw-r--r--json-rpc-shell.c24
1 files changed, 1 insertions, 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)