From: Alan T. DeKok Date: Mon, 13 Jan 2025 21:21:52 +0000 (-0500) Subject: we can't set da->type until later, or else things complain X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=396609977402aed0c5761ab35022d211fbf973ee;p=thirdparty%2Ffreeradius-server.git we can't set da->type until later, or else things complain --- diff --git a/src/lib/util/dict.h b/src/lib/util/dict.h index 193a05ea2be..649383de791 100644 --- a/src/lib/util/dict.h +++ b/src/lib/util/dict.h @@ -304,7 +304,7 @@ typedef enum { } fr_dict_attr_err_t; typedef bool (*fr_dict_attr_valid_func_t)(fr_dict_attr_t *da); -typedef bool (*fr_dict_attr_type_parse_t)(fr_dict_attr_t **da_p, char const *name); +typedef bool (*fr_dict_attr_type_parse_t)(fr_type_t *type, fr_dict_attr_t **da_p, char const *name); /* * Forward declarations to avoid circular references. diff --git a/src/lib/util/dict_tokenize.c b/src/lib/util/dict_tokenize.c index c9d38743746..88e49c2cc1d 100644 --- a/src/lib/util/dict_tokenize.c +++ b/src/lib/util/dict_tokenize.c @@ -440,12 +440,10 @@ static int dict_process_type_field(dict_tokenize_ctx_t *dctx, char const *name, return -1; } - if (!dctx->dict->proto->attr.type_parse(da_p, name)) { + if (!dctx->dict->proto->attr.type_parse(&type, da_p, name)) { return -1; } - type = (*da_p)->type; - fr_assert(!fr_type_is_null(type)); }