From: Alan T. DeKok Date: Mon, 18 Dec 2023 23:14:45 +0000 (-0500) Subject: add more data types to htrie hint X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14af377afa3baeb239b2ebb20ae4587fe245e1e6;p=thirdparty%2Ffreeradius-server.git add more data types to htrie hint --- diff --git a/src/lib/util/htrie.h b/src/lib/util/htrie.h index dfb39b86f0a..f444c702321 100644 --- a/src/lib/util/htrie.h +++ b/src/lib/util/htrie.h @@ -141,8 +141,7 @@ static inline CC_HINT(nonnull) int fr_htrie_num_elements(fr_htrie_t *ht) static inline fr_htrie_type_t fr_htrie_hint(fr_type_t type) { switch (type) { - case FR_TYPE_INTEGER: - case FR_TYPE_ETHERNET: + default: return FR_HTRIE_HASH; case FR_TYPE_IP: @@ -150,9 +149,14 @@ static inline fr_htrie_type_t fr_htrie_hint(fr_type_t type) case FR_TYPE_STRING: case FR_TYPE_OCTETS: + case FR_TYPE_DATE: + case FR_TYPE_TIME_DELTA: return FR_HTRIE_RB; - default: + case FR_TYPE_FLOAT32: /* exact float comparisons are impossible */ + case FR_TYPE_FLOAT64: + case FR_TYPE_BOOL: /* what are they on? */ + case FR_TYPE_STRUCTURAL: return FR_HTRIE_INVALID; } }