]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
minor cleanups
authorAlan T. DeKok <aland@freeradius.org>
Fri, 11 Apr 2025 00:55:16 +0000 (20:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 11 Apr 2025 00:55:16 +0000 (20:55 -0400)
src/lib/unlang/xlat_eval.c
src/lib/unlang/xlat_tokenize.c
src/tests/unit/xlat/purify.txt

index 8dddb1bfc1c9e4cc9b328317274a0ffd0d2f1570..52208da578e1ae50325edb814863aa0a24fdefe3 100644 (file)
@@ -378,7 +378,7 @@ static xlat_action_t xlat_process_arg_list(TALLOC_CTX *ctx, fr_value_box_list_t
        fr_assert(node->type == XLAT_GROUP);
 
        /*
-        *      Concatenate child boxes, then to the desired type.
+        *      Concatenate child boxes, then cast to the desired type.
         */
        if (concat) {
                if (fr_value_box_list_concat_in_place(ctx, vb, list, type, FR_VALUE_BOX_LIST_FREE, true, SIZE_MAX) < 0) {
index 086df62fd84145d61abc7566c58d0aa0496c75de..be1c6208f33ed2fb029720ea31b24c90ccaaa192 100644 (file)
@@ -181,7 +181,6 @@ static int xlat_tmpl_normalize(xlat_exp_t *node)
                return 0;
        }
 
-#if 0
        /*
         *      We have a nested xlat.  This is likely bad.  The caller SHOULD have checked for %{...}, and
         *      created an XLAT_GROUP, and then parsed that.
@@ -189,10 +188,8 @@ static int xlat_tmpl_normalize(xlat_exp_t *node)
        if (tmpl_contains_xlat(vpt)) {
                fr_assert(!tmpl_needs_resolving(vpt));
                fr_assert(!tmpl_contains_regex(vpt));
-
                return 0;
        }
-#endif
 
        if (!tmpl_contains_data(vpt)) {
                fr_assert(!tmpl_needs_resolving(vpt));
index a51580145061d0291c592f73d4ba195debb1f56a..755f920327c73ed37c8f069fa93674e9d1509a5a 100644 (file)
@@ -227,9 +227,6 @@ match "hello 3"
 xlat_purify "hello " + (string)%{1 + 2} + " bob"
 match "hello 3 bob"
 
-#
-#  @todo - xlat_purify doesn't hoist results.
-#
 xlat_purify "hello %{1 + 2} bob"
 match "hello 3 bob"
 
@@ -244,9 +241,6 @@ match 0xacbd18db4cc2f85cedef654fccc4a4d8
 xlat_purify %explode("a,b,c,d", ',')
 match "a""b""c""d"
 
-#
-# @todo - bare words should probably be disallowed
-#
 xlat_purify %md5('foo')
 match 0xacbd18db4cc2f85cedef654fccc4a4d8