* @file xlat_tokenize.c
* @brief String expansion ("translation"). Tokenizes xlat expansion strings.
*
+ * @copyright 2017-2021 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
* @copyright 2000 Alan DeKok (aland@freeradius.org)
* @copyright 2000,2006 The FreeRADIUS server project
- * @copyright 2017-2020 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
*/
RCSID("$Id$")
return node;
}
-
/** Allocate an xlat node
*
* @param[in] ctx to allocate node in.
if (!in) return node;
node->fmt = talloc_bstrndup(node, in, inlen);
-
- if (type == XLAT_BOX) {
+ switch (type) {
+ case XLAT_BOX:
fr_value_box_strdup_shallow(&node->data, NULL, node->fmt, false);
+ break;
+
+ default:
+ break;
}
return node;
*/
case XLAT_VIRTUAL_UNRESOLVED:
{
- if (xlat_resolve_virtual_attribute(node, node->attr) == 0) {
- break;
- }
+ if (xlat_resolve_virtual_attribute(node, node->attr) == 0) break;
/*
* Try and resolve (in-place) as an attribute