From: Alan T. DeKok Date: Mon, 21 Aug 2023 00:45:31 +0000 (-0400) Subject: use vp_ name for immutable field X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11c6e57ecb9c0c0d5ffc17c12e197a53435e85a3;p=thirdparty%2Ffreeradius-server.git use vp_ name for immutable field --- diff --git a/src/lib/util/edit.c b/src/lib/util/edit.c index 5959c03cc72..08284f7ee89 100644 --- a/src/lib/util/edit.c +++ b/src/lib/util/edit.c @@ -609,7 +609,7 @@ int fr_edit_list_replace_pair_value(fr_edit_list_t *el, fr_pair_t *vp, fr_value_ { if (!fr_type_is_leaf(vp->vp_type)) return -1; - if (vp->data.immutable) { + if (vp->vp_immutable) { fr_strerror_printf("Cannot modify immutable value for %s", vp->da->name); return -1; } diff --git a/src/lib/util/pair.c b/src/lib/util/pair.c index fa54dffa8df..664ccba325f 100644 --- a/src/lib/util/pair.c +++ b/src/lib/util/pair.c @@ -2095,11 +2095,11 @@ bool fr_pair_validate_relaxed(fr_pair_t const *failed[2], fr_pair_list_t *filter */ bool fr_pair_immutable(fr_pair_t const *vp) { - if (fr_type_is_leaf(vp->vp_type)) return vp->data.immutable; + if (fr_type_is_leaf(vp->vp_type)) return vp->vp_immutable; fr_pair_list_foreach(&vp->vp_group, child) { if (fr_type_is_leaf(child->vp_type)) { - if (child->data.immutable) return true; + if (child->vp_immutable) return true; continue; } diff --git a/src/lib/util/pair.h b/src/lib/util/pair.h index 08c504145fd..eec580b72be 100644 --- a/src/lib/util/pair.h +++ b/src/lib/util/pair.h @@ -137,6 +137,7 @@ struct value_pair_s { #define vp_type data.type #define vp_tainted data.tainted +#define vp_immutable data.immutable #define ATTRIBUTE_EQ(_x, _y) ((_x && _y) && (_x->da == _y->da))