]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
all children are groups
authorAlan T. DeKok <aland@freeradius.org>
Thu, 20 Jan 2022 17:29:55 +0000 (12:29 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 20 Jan 2022 17:29:55 +0000 (12:29 -0500)
don't bother doing casts here, as it's not necessary

src/lib/unlang/xlat_tokenize.c

index 9b6ca9e05e24a6471b16f0f02844373bb3f85a88..7f54f021fcf0b6284c5c702d59db5543b10e1e69 100644 (file)
@@ -424,12 +424,10 @@ int xlat_validate_function_args(xlat_exp_t *node)
                }
 
                /*
-                *      The argument isn't of the correct type.  Cast it.
+                *      All arguments MUST be put into a group, even
+                *      if they're just one element.
                 */
-               if ((child->type == XLAT_BOX) && (child->data.type != arg_p->type) &&
-                   (fr_value_box_cast_in_place(child, &child->data, arg_p->type, NULL) < 0)) {
-                       return -1;
-               }
+               fr_assert(child->type == XLAT_GROUP);
 
                child = child->next;
        }