]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
reorder types
authorAlan T. DeKok <aland@freeradius.org>
Wed, 17 Nov 2021 18:25:16 +0000 (13:25 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 17 Nov 2021 18:25:16 +0000 (13:25 -0500)
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.

src/lib/util/types.h
src/lib/util/value.c

index ab9876d80edb5d84975ba4b4464cfdd63cca08d8..bc03a3ad62aefd0d65bb71ea9bf02256588dbcb4 100644 (file)
@@ -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
index 41b6aa3eaa77305250dd2e2e31e9fc3dfb6ccbfa..fc5a10742cccd4b26d76f6a7f63bdad0976f6cc0 100644 (file)
@@ -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          },