]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
Give access to type size info without explicit use of dict_attr_sizes[]
authorJames Jones <jejones3141@gmail.com>
Thu, 14 Jan 2021 22:20:59 +0000 (16:20 -0600)
committerAlan DeKok <aland@freeradius.org>
Fri, 15 Jan 2021 14:47:49 +0000 (09:47 -0500)
commit74d046795c595581bdb97225165c3e64a5da80ff
treefa240e79281ca11400808eaad91f5a9e71f9d2b2
parent87a504089a7f24988ecb1e8960da522c797b07c1
Give access to type size info without explicit use of dict_attr_sizes[]

The change provides min_size() and max_size() macros and a Boolean
function, is_fixed_size(). All take an fr_type_t value and do the
subscripting of dict_attr_sizes for the user. References to
dict_attr_sizes[] other than definition and initialization have
been changed to use these, to exercise them and I believe make
the intent of the rewritten code clearer.
src/lib/util/dict.h
src/lib/util/dict_validate.c
src/lib/util/value.c
src/modules/rlm_unpack/rlm_unpack.c
src/protocols/dhcpv4/encode.c