From: Alan T. DeKok Date: Wed, 17 Nov 2021 18:25:16 +0000 (-0500) Subject: reorder types X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1488bbc80f503ced733946d874055ac7c2ebcee7;p=thirdparty%2Ffreeradius-server.git reorder types the ordered table in value.c didn't match the fr_type_t enum. We now have all integer types together. All unsigned types together. And all signed types together. --- diff --git a/src/lib/util/types.h b/src/lib/util/types.h index ab9876d80ed..bc03a3ad62a 100644 --- a/src/lib/util/types.h +++ b/src/lib/util/types.h @@ -54,21 +54,20 @@ typedef enum { FR_TYPE_UINT32, //!< 32 Bit unsigned integer. FR_TYPE_UINT64, //!< 64 Bit unsigned integer. + FR_TYPE_SIZE, //!< Unsigned integer capable of representing any memory + //!< address on the local system. + + FR_TYPE_DATE, //!< Unix time stamp, always has value >2^31 FR_TYPE_INT8, //!< 8 Bit signed integer. FR_TYPE_INT16, //!< 16 Bit signed integer. FR_TYPE_INT32, //!< 32 Bit signed integer. FR_TYPE_INT64, //!< 64 Bit signed integer. - FR_TYPE_FLOAT32, //!< Single precision floating point. - FR_TYPE_FLOAT64, //!< Double precision floating point. - - FR_TYPE_DATE, //!< Unix time stamp, always has value >2^31 - FR_TYPE_TIME_DELTA, //!< A period of time measured in nanoseconds. - FR_TYPE_SIZE, //!< Unsigned integer capable of representing any memory - //!< address on the local system. + FR_TYPE_FLOAT32, //!< Single precision floating point. + FR_TYPE_FLOAT64, //!< Double precision floating point. FR_TYPE_TLV, //!< Contains nested attributes. FR_TYPE_STRUCT, //!< like TLV, but without T or L, and fixed-width children diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 41b6aa3eaa7..fc5a10742cc 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -119,18 +119,19 @@ fr_table_num_ordered_t const fr_value_box_type_table[] = { { L("uint32"), FR_TYPE_UINT32 }, { L("uint64"), FR_TYPE_UINT64 }, + { L("size"), FR_TYPE_SIZE }, + + { L("date"), FR_TYPE_DATE }, + { L("int8"), FR_TYPE_INT8 }, { L("int16"), FR_TYPE_INT16 }, { L("int32"), FR_TYPE_INT32 }, { L("int64"), FR_TYPE_INT64 }, - { L("float32"), FR_TYPE_FLOAT32 }, - { L("float64"), FR_TYPE_FLOAT64 }, - { L("time_delta"), FR_TYPE_TIME_DELTA }, - { L("date"), FR_TYPE_DATE }, - { L("size"), FR_TYPE_SIZE }, + { L("float32"), FR_TYPE_FLOAT32 }, + { L("float64"), FR_TYPE_FLOAT64 }, { L("tlv"), FR_TYPE_TLV }, { L("struct"), FR_TYPE_STRUCT },