From: Alan T. DeKok Date: Thu, 20 Jan 2022 17:29:55 +0000 (-0500) Subject: all children are groups X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74fc92bae70c01b7a45c1541b91a222482dd1090;p=thirdparty%2Ffreeradius-server.git all children are groups don't bother doing casts here, as it's not necessary --- diff --git a/src/lib/unlang/xlat_tokenize.c b/src/lib/unlang/xlat_tokenize.c index 9b6ca9e05e..7f54f021fc 100644 --- a/src/lib/unlang/xlat_tokenize.c +++ b/src/lib/unlang/xlat_tokenize.c @@ -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; }