From: Arran Cudbard-Bell Date: Sun, 19 Feb 2023 22:45:59 +0000 (-0600) Subject: xlat: Formatting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6c523ebde333391ff38159593e8aa67d732c204;p=thirdparty%2Ffreeradius-server.git xlat: Formatting --- diff --git a/src/lib/unlang/xlat_priv.h b/src/lib/unlang/xlat_priv.h index 27ffc8c6d49..8da00d687cc 100644 --- a/src/lib/unlang/xlat_priv.h +++ b/src/lib/unlang/xlat_priv.h @@ -171,7 +171,6 @@ struct xlat_exp_s { xlat_call_t call; /** A value box - * */ fr_value_box_t data; }; @@ -190,10 +189,9 @@ struct xlat_exp_head_s { #endif }; - typedef struct { - char const *out; //!< Output data. - size_t len; //!< Length of the output string. + char const *out; //!< Output data. + size_t len; //!< Length of the output string. } xlat_out_t; /* * Helper functions @@ -367,7 +365,8 @@ int xlat_tokenize_expansion(xlat_exp_head_t *head, fr_sbuff_t *in, int xlat_tokenize_function_args(xlat_exp_head_t *head, fr_sbuff_t *in, tmpl_rules_t const *t_rules); -ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t const *node, fr_sbuff_escape_rules_t const *e_rules); +ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t const *node, + fr_sbuff_escape_rules_t const *e_rules); /* * xlat_inst.c diff --git a/src/lib/unlang/xlat_purify.c b/src/lib/unlang/xlat_purify.c index 676a38a8612..97dfe81b5ce 100644 --- a/src/lib/unlang/xlat_purify.c +++ b/src/lib/unlang/xlat_purify.c @@ -47,7 +47,6 @@ static void xlat_value_list_to_xlat(xlat_exp_head_t *head, FR_DLIST_HEAD(fr_valu node->quote = T_BARE_WORD; fr_value_box_aprint(node, &name, box, NULL); - xlat_exp_set_name_buffer_shallow(node, name); } talloc_free(box); @@ -305,7 +304,6 @@ static int binary_peephole_optimize(TALLOC_CTX *ctx, xlat_exp_t **out, xlat_exp_ if (box.type == FR_TYPE_BOOL) box.enumv = attr_expr_bool_enum; (void) fr_value_box_aprint(node, &name, &box, NULL); - xlat_exp_set_name_buffer_shallow(node, name); fr_value_box_copy(node, &node->data, &box); diff --git a/src/lib/unlang/xlat_tokenize.c b/src/lib/unlang/xlat_tokenize.c index 5f485545124..83729a86422 100644 --- a/src/lib/unlang/xlat_tokenize.c +++ b/src/lib/unlang/xlat_tokenize.c @@ -1189,7 +1189,8 @@ void xlat_debug(xlat_exp_head_t const *head) _xlat_debug(head, 0); } -ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t const *node, fr_sbuff_escape_rules_t const *e_rules) +ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t const *node, + fr_sbuff_escape_rules_t const *e_rules) { ssize_t slen; size_t at_in = fr_sbuff_used_total(out); @@ -1426,8 +1427,7 @@ fr_slen_t xlat_tokenize_ephemeral(TALLOC_CTX *ctx, xlat_exp_head_t **out, our_t_rules.xlat.runtime_el = el; fr_strerror_clear(); /* Clear error buffer */ - if (xlat_tokenize_string(head, &our_in, - false, p_rules, &our_t_rules) < 0) { + if (xlat_tokenize_string(head, &our_in, false, p_rules, &our_t_rules) < 0) { talloc_free(head); FR_SBUFF_ERROR_RETURN(&our_in); } @@ -1646,8 +1646,7 @@ fr_slen_t xlat_tokenize(TALLOC_CTX *ctx, xlat_exp_head_t **out, fr_sbuff_t *in, fr_strerror_clear(); /* Clear error buffer */ - if (xlat_tokenize_string(head, &our_in, - false, p_rules, t_rules) < 0) { + if (xlat_tokenize_string(head, &our_in, false, p_rules, t_rules) < 0) { talloc_free(head); FR_SBUFF_ERROR_RETURN(&our_in); }