]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use vp_ name for immutable field
authorAlan T. DeKok <aland@freeradius.org>
Mon, 21 Aug 2023 00:45:31 +0000 (20:45 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 21 Aug 2023 00:45:31 +0000 (20:45 -0400)
src/lib/util/edit.c
src/lib/util/pair.c
src/lib/util/pair.h

index 5959c03cc720d33e8b79d87af5ee611c56f75a72..08284f7ee896e7f1e4d360a82a88ec5b98c11850 100644 (file)
@@ -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;
        }
index fa54dffa8df7b806d84ad327d6f324bb81fbc8a3..664ccba325f3b67fa496347f0e4699c95da573cc 100644 (file)
@@ -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;
                }
index 08c504145fda8871d5ddf9bcd79661fd96285933..eec580b72be02a5a957a655eebbce72c897f5f05 100644 (file)
@@ -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))