From 722620f92e7e2a06a8a4af3c809c13f8805833e4 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Fri, 7 Mar 2025 09:14:57 -0500 Subject: [PATCH] remove unused function --- src/lib/unlang/xlat.h | 3 --- src/lib/unlang/xlat_eval.c | 45 -------------------------------------- 2 files changed, 48 deletions(-) diff --git a/src/lib/unlang/xlat.h b/src/lib/unlang/xlat.h index 2af31000f4..152c6059f1 100644 --- a/src/lib/unlang/xlat.h +++ b/src/lib/unlang/xlat.h @@ -396,9 +396,6 @@ ssize_t xlat_aeval_compiled(TALLOC_CTX *ctx, char **out, request_t *request, xlat_exp_head_t const *head, xlat_escape_legacy_t escape, void const *escape_ctx) CC_HINT(nonnull (2, 3, 4)); -int xlat_aeval_compiled_argv(TALLOC_CTX *ctx, char ***argv, request_t *request, - xlat_exp_head_t const *head, xlat_escape_legacy_t escape, void const *escape_ctx); - int xlat_flatten_compiled_argv(TALLOC_CTX *ctx, xlat_exp_head_t ***argv, xlat_exp_head_t *head); fr_slen_t xlat_tokenize_expression(TALLOC_CTX *ctx, xlat_exp_head_t **head, fr_sbuff_t *in, diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index a1b5ff5345..293e1cec83 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -1573,51 +1573,6 @@ ssize_t xlat_aeval_compiled(TALLOC_CTX *ctx, char **out, request_t *request, } -/** Synchronous compile xlat_tokenize_argv() into argv[] array. - * - * This is mostly for synchronous evaluation. - * - * @param ctx The talloc_ctx - * @param[out] argv the argv array of resulting strings, size is argc + 1 - * @param request the request - * @param head from xlat_tokenize_argv() - * @param escape escape function - * @param escape_ctx context for escape function - * @return - * - <=0 on error number indicates which argument caused the problem - * - >0 on success which is argc to the corresponding argv - */ -int xlat_aeval_compiled_argv(TALLOC_CTX *ctx, char ***argv, request_t *request, - xlat_exp_head_t const *head, xlat_escape_legacy_t escape, void const *escape_ctx) -{ - int i; - ssize_t slen; - char **my_argv; - size_t count; - - count = 0; - xlat_exp_foreach(head, node) { - count++; - } - - MEM(my_argv = talloc_zero_array(ctx, char *, count + 1)); - *argv = my_argv; - - fr_assert(instance_count); - - i = 0; - xlat_exp_foreach(head, node) { - my_argv[i] = NULL; - - slen = _xlat_eval_compiled(my_argv, &my_argv[i], 0, request, node->group, escape, escape_ctx); - if (slen < 0) return -i; - - i++; - } - - return count; -} - /** Turn xlat_tokenize_argv() into an argv[] array, and nuke the input list. * * This is mostly for async use. -- 2.47.2