From: Alan T. DeKok Date: Mon, 11 Jul 2022 15:29:44 +0000 (-0400) Subject: simplify checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b87b766bf4555daf1e2b384ae138fa72e6650dea;p=thirdparty%2Ffreeradius-server.git simplify checks --- diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index 9114705506e..b215009f8af 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -2154,7 +2154,7 @@ static ssize_t tokenize_field(xlat_exp_head_t *head, xlat_exp_t **out, fr_sbuff_ * And if there was no cast, but the input was a string, * then we cast the result to a string, too. */ - if (tmpl_contains_xlat(vpt) && !tmpl_is_exec(vpt) && !tmpl_contains_regex(vpt)) { + if (tmpl_is_xlat(vpt) || tmpl_is_xlat_unresolved(vpt)) { xlat_exp_head_t *xlat = tmpl_xlat(vpt); xlat_exp_t *cast; fr_type_t type;