From: Alan T. DeKok Date: Tue, 22 Sep 2020 13:47:36 +0000 (-0400) Subject: use da_stack X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3f975bb3c2e97911ad2d4e16ebf1958ffc137b6;p=thirdparty%2Ffreeradius-server.git use da_stack --- diff --git a/src/lib/util/dict.h b/src/lib/util/dict.h index a5f3c850b34..70b05ddcdd4 100644 --- a/src/lib/util/dict.h +++ b/src/lib/util/dict.h @@ -135,7 +135,7 @@ struct dict_attr_s { fr_dict_attr_t const *ref; //!< reference }; - fr_dict_attr_t const *tlv_stack[0]; //!< load-time TLV stacks + fr_dict_attr_t const *da_stack[0]; //!< load-time TLV stacks }; /** Value of an enumerated attribute diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index b9a8bbc8947..e28b5bc0ea3 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -383,7 +383,7 @@ fr_dict_attr_t *dict_attr_alloc_name(TALLOC_CTX *ctx, fr_dict_attr_t const *pare if (parent) depth = parent->depth + 1; - da = talloc_zero_size(ctx, sizeof(fr_dict_attr_t) + sizeof(da->tlv_stack[0]) * (depth + 1)); + da = talloc_zero_size(ctx, sizeof(fr_dict_attr_t) + sizeof(da->da_stack[0]) * (depth + 1)); if (!da) return NULL; talloc_set_type(da, fr_dict_attr_t); @@ -397,20 +397,20 @@ fr_dict_attr_t *dict_attr_alloc_name(TALLOC_CTX *ctx, fr_dict_attr_t const *pare /* * Set up parent / child relationship, and copy the - * tlv_stack from the parent. + * da_stack from the parent. */ if (parent) { da->parent = parent; da->depth = depth; - memcpy(&da->tlv_stack[0], &parent->tlv_stack[0], - sizeof(da->tlv_stack[0]) * depth); + memcpy(&da->da_stack[0], &parent->da_stack[0], + sizeof(da->da_stack[0]) * depth); } /* * Always set the last stack entry to ourselves. */ - da->tlv_stack[depth] = da; + da->da_stack[depth] = da; return da; }