From: Alan T. DeKok Date: Mon, 22 Nov 2021 20:13:35 +0000 (-0500) Subject: now that we don't mangle things, put these into a union X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ea858fa11a4eab0f978384a52af664b9949976d;p=thirdparty%2Ffreeradius-server.git now that we don't mangle things, put these into a union because there's no reason to have all of the field available for all of the xlat types --- diff --git a/src/lib/unlang/xlat_priv.h b/src/lib/unlang/xlat_priv.h index 19e7b3a6d4d..4c12f40e354 100644 --- a/src/lib/unlang/xlat_priv.h +++ b/src/lib/unlang/xlat_priv.h @@ -120,21 +120,24 @@ struct xlat_exp { xlat_exp_t *next; //!< Next in the list. xlat_exp_t *child; //!< Nested expansion, i.e. arguments for an xlat function. - xlat_exp_t *alternate; //!< Alternative expansion if this expansion produced no values. - /** An attribute reference - * - * May be an attribute to expand, or provide context for a call. - */ - tmpl_t *attr; - - /** A capture group, i.e. for %{1} and friends - */ - int regex_index; - - /** An xlat function call - */ - xlat_call_t call; + union { + xlat_exp_t *alternate; //!< Alternative expansion if this expansion produced no values. + + /** An attribute reference + * + * May be an attribute to expand, or provide context for a call. + */ + tmpl_t *attr; + + /** A capture group, i.e. for %{1} and friends + */ + int regex_index; + + /** An xlat function call + */ + xlat_call_t call; + }; }; typedef struct {