From: Alan T. DeKok Date: Wed, 11 May 2022 13:55:16 +0000 (-0400) Subject: no need to pass flags here X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5ccdbb8b470a42879d930d0e834cefdf057a56f;p=thirdparty%2Ffreeradius-server.git no need to pass flags here --- diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index 8326882713c..296ddc247ae 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -420,9 +420,8 @@ static bool do_xlats(fr_event_list_t *el, char const *filename, FILE *fp) TALLOC_CTX *xlat_ctx = talloc_init_const("xlat"); char *fmt = talloc_typed_strdup(xlat_ctx, input + 10); xlat_exp_head_t *head = NULL; - xlat_flags_t flags = { }; - slen = xlat_tokenize_ephemeral_expression(xlat_ctx, &head, el, &flags, + slen = xlat_tokenize_ephemeral_expression(xlat_ctx, &head, el, NULL, &FR_SBUFF_IN(fmt, talloc_array_length(fmt) - 1), NULL, &(tmpl_rules_t) { @@ -446,7 +445,7 @@ static bool do_xlats(fr_event_list_t *el, char const *filename, FILE *fp) continue; } - if (xlat_resolve(head, &flags, NULL) < 0) { + if (xlat_resolve(head, NULL, NULL) < 0) { talloc_free(xlat_ctx); snprintf(output, sizeof(output), "ERROR resolving xlat: %s", fr_strerror()); continue; diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index e08e1a382cc..5bc55584ff3 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -1557,8 +1557,6 @@ static xlat_action_t xlat_func_eval(TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) { - - xlat_flags_t flags = {}; xlat_eval_rctx_t *rctx; fr_value_box_t *arg = fr_dlist_head(in); @@ -1587,7 +1585,7 @@ static xlat_action_t xlat_func_eval(TALLOC_CTX *ctx, fr_dcursor_t *out, * Parse the input as a literal expansion */ if (xlat_tokenize_ephemeral(rctx, - &rctx->ex, unlang_interpret_event_list(request), &flags, + &rctx->ex, unlang_interpret_event_list(request), NULL, &FR_SBUFF_IN(arg->vb_strvalue, arg->vb_length), &(fr_sbuff_parse_rules_t){ .escapes = &escape_rules @@ -1612,8 +1610,8 @@ static xlat_action_t xlat_func_eval(TALLOC_CTX *ctx, fr_dcursor_t *out, * good errors about what function was * unresolved. */ - if (flags.needs_resolving && - (xlat_resolve(rctx->ex, &flags, &(xlat_res_rules_t){ .allow_unresolved = false }) < 0)) { + if (rctx->ex->flags.needs_resolving && + (xlat_resolve(rctx->ex, NULL, &(xlat_res_rules_t){ .allow_unresolved = false }) < 0)) { RPEDEBUG("Unresolved expansion functions in expansion"); goto error;