summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-30 22:28:30 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-30 22:28:30 -0700
commitf0e8f027b48127b44f33188508efdd13670b8be3 (patch)
treea4bd4b89e6664c652c54e8c3281aa6145bff5cf7
parent09a0b4ea919d4186b301c34ad51f0c5c5227e1f6 (diff)
til_builtins: use til_settings_get_and_describe_setting()
_ref_setup() doesn't have any -EINVAL failure paths in res_setup baking, but let's get off til_settings_get_and_describe_value() so it can go away.
-rw-r--r--src/til_builtins.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/til_builtins.c b/src/til_builtins.c
index 52318e1..6f63ffd 100644
--- a/src/til_builtins.c
+++ b/src/til_builtins.c
@@ -131,10 +131,10 @@ til_module_t _ref_module = {
static int _ref_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup)
{
- const char *path;
+ til_setting_t *path;
int r;
- r = til_settings_get_and_describe_value(settings,
+ r = til_settings_get_and_describe_setting(settings,
&(til_setting_spec_t){
.name = "Context path to reference",
.key = "path",
@@ -154,7 +154,7 @@ static int _ref_setup(const til_settings_t *settings, til_setting_t **res_settin
if (!setup)
return -ENOMEM;
- setup->path = strdup(path);
+ setup->path = strdup(path->value);
if (!setup->path) {
til_setup_free(&setup->til_setup);
© All Rights Reserved