We want FR_TYPE_NULL to mean something else, and we don't want to
use it as a normal result.
/*
* Fill is optional
*/
- if (fill->type != FR_TYPE_NULL) {
+ if (fill) {
fill_str = fill->vb_strvalue;
fill_len = talloc_array_length(fill_str) - 1;
}
/*
* Fill is optional
*/
- if (fill->type != FR_TYPE_NULL) {
+ if (fill) {
fill_str = fill->vb_strvalue;
fill_len = talloc_array_length(fill_str) - 1;
}
}
/*
- * Add a placeholder 'null' box
+ * The argument isn't required. Just omit it. xlat_func_args() enforces
+ * that optional arguments are at the end of the argument list.
*/
- MEM(vb = fr_value_box_alloc(ctx, FR_TYPE_NULL, NULL, false));
- fr_dlist_insert_tail(list, vb);
return XLAT_ACTION_DONE;
}