@@ -479,7 +479,7 @@ static int xlat_resolve_virtual_attribute(xlat_exp_t *node, tmpl_t *vpt)
479479 if (!func ) return -1 ;
480480
481481 xlat_exp_set_type (node , XLAT_VIRTUAL );
482- xlat_exp_set_name_buffer_shallow (node , vpt -> name );
482+ xlat_exp_set_name_shallow (node , vpt -> name );
483483
484484 XLAT_DEBUG ("VIRTUAL <-- %pV" ,
485485 fr_box_strvalue_len (vpt -> name , vpt -> len ));
@@ -575,15 +575,15 @@ static CC_HINT(nonnull(1,2,4)) ssize_t xlat_tokenize_attribute(xlat_exp_head_t *
575575 * this out in a later pass.
576576 */
577577 xlat_exp_set_type (node , XLAT_VIRTUAL_UNRESOLVED );
578- xlat_exp_set_name_buffer_shallow (node , vpt -> name );
578+ xlat_exp_set_name_shallow (node , vpt -> name );
579579 node -> vpt = vpt ;
580580 node -> flags .needs_resolving = true;
581581 /*
582582 * Deal with normal attribute (or list)
583583 */
584584 } else {
585585 xlat_exp_set_type (node , XLAT_TMPL );
586- xlat_exp_set_name_buffer_shallow (node , vpt -> name );
586+ xlat_exp_set_name_shallow (node , vpt -> name );
587587 node -> vpt = vpt ;
588588 }
589589
@@ -676,7 +676,6 @@ int xlat_tokenize_expansion(xlat_exp_head_t *head, fr_sbuff_t *in,
676676 */
677677 {
678678 int ret ;
679- char * fmt ;
680679 xlat_exp_t * node ;
681680 xlat_exp_head_t * child ;
682681 tmpl_rules_t my_rules ;
@@ -704,9 +703,8 @@ int xlat_tokenize_expansion(xlat_exp_head_t *head, fr_sbuff_t *in,
704703 return -1 ;
705704 }
706705
707- MEM (fmt = talloc_bstrndup (node , fr_sbuff_current (& s_m ), fr_sbuff_behind (& s_m )));
708- xlat_exp_set_name_buffer_shallow (node , fmt );
709- tmpl_set_name_shallow (node -> vpt , T_BARE_WORD , fmt , fr_sbuff_behind (& s_m ));
706+ xlat_exp_set_name (node , fr_sbuff_current (& s_m ), fr_sbuff_behind (& s_m ));
707+ tmpl_set_name_shallow (node -> vpt , T_BARE_WORD , node -> fmt , fr_sbuff_behind (& s_m ));
710708
711709 tmpl_set_xlat (node -> vpt , child );
712710 xlat_exp_insert_tail (head , node );
@@ -872,7 +870,7 @@ static CC_HINT(nonnull(1,2,4)) ssize_t xlat_tokenize_input(xlat_exp_head_t *head
872870 */
873871 if (slen > 0 ) {
874872 do_value_box :
875- xlat_exp_set_name_buffer_shallow (node , str );
873+ xlat_exp_set_name_shallow (node , str );
876874 fr_value_box_strdup (node , & node -> data , NULL , str , false);
877875 fr_value_box_mark_safe_for (& node -> data , t_rules -> literals_safe_for );
878876 node -> flags .constant = true;
@@ -1467,7 +1465,6 @@ fr_slen_t xlat_tokenize_argv(TALLOC_CTX *ctx, xlat_exp_head_t **out, fr_sbuff_t
14671465 while (fr_sbuff_extend (& our_in )) {
14681466 xlat_exp_t * node = NULL ;
14691467 fr_token_t quote ;
1470- char * fmt ;
14711468 size_t len ;
14721469
14731470 fr_sbuff_set (& m , & our_in ); /* Record start of argument */
@@ -1594,7 +1591,7 @@ fr_slen_t xlat_tokenize_argv(TALLOC_CTX *ctx, xlat_exp_head_t **out, fr_sbuff_t
15941591 value_parse_rules_single_quoted .escapes );
15951592 if (slen < 0 ) goto error ;
15961593
1597- xlat_exp_set_name_buffer_shallow (child , str );
1594+ xlat_exp_set_name_shallow (child , str );
15981595 fr_value_box_strdup (child , & child -> data , NULL , str , false);
15991596 fr_value_box_mark_safe_for (& child -> data , arg -> safe_for ); /* Literal values are treated as implicitly safe */
16001597 child -> flags .constant = true;
@@ -1621,8 +1618,7 @@ fr_slen_t xlat_tokenize_argv(TALLOC_CTX *ctx, xlat_exp_head_t **out, fr_sbuff_t
16211618 goto error ;
16221619 }
16231620
1624- fmt = talloc_bstrndup (node , fr_sbuff_current (& m ), fr_sbuff_behind (& m ));
1625- xlat_exp_set_name_buffer_shallow (node , fmt );
1621+ xlat_exp_set_name (node , fr_sbuff_current (& m ), fr_sbuff_behind (& m ));
16261622
16271623 /*
16281624 * Assert that the parser has created things which are safe for the current argument.
0 commit comments