From: Arran Cudbard-Bell Date: Mon, 14 Oct 2024 01:41:09 +0000 (-0400) Subject: Corrections to new table macros X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9698e91c5473716c008cd537aebd3c222049c8d6;p=thirdparty%2Ffreeradius-server.git Corrections to new table macros --- diff --git a/src/lib/util/table.h b/src/lib/util/table.h index 9c559bd5a31..5d94d934fbd 100644 --- a/src/lib/util/table.h +++ b/src/lib/util/table.h @@ -141,10 +141,9 @@ _our_return_type _our_name(_our_table_type table, size_t table_len, char const * * @param[in] _our_def_type C type of the default value. * @param[in] _our_out_type C type of the return/output value, i.e. the value part of the element. */ -#define TABLE_TYPE_NAME_FUNC_RPTR(_func, _our_table_type, _our_name, _our_def_type, _our_return_type) \ -_our_return_type _our_name(__our_out_type **out, our_table_type table, size_t table_len, char const *name, _our_def_type *def) \ +#define TABLE_TYPE_NAME_FUNC_RPTR(_func, _our_table_type, _our_name, _our_def_type, _our_out_type) \ +bool _our_name(_our_out_type *out, _our_table_type table, size_t table_len, char const *name, _our_def_type def) \ { \ - _our_return_type ret; \ _our_table_type found; \ found = (_our_table_type)_func(table, table_len, sizeof(((_our_table_type)0)[0]), name); \ if (!found) { \ @@ -204,10 +203,9 @@ _our_return_type _our_name(_our_table_type table, size_t table_len, char const * * @param[in] _our_def_type C type of the default value. * @param[in] _our_out_type C type of the return/output value, i.e. the value part of the element. */ -#define TABLE_TYPE_NAME_LEN_FUNC_RPTR(_func, _our_table_type, _our_name, _our_def_type, _our_return_type) \ -bool _our_name(_our_out_type **out, _our_table_type table, size_t table_len, char const *name, ssize_t name_len, _our_def_type *def) \ +#define TABLE_TYPE_NAME_LEN_FUNC_RPTR(_func, _our_table_type, _our_name, _our_def_type, _our_out_type) \ +bool _our_name(_our_out_type *out, _our_table_type table, size_t table_len, char const *name, ssize_t name_len, _our_def_type def) \ { \ - _our_return_type ret; \ _our_table_type found; \ found = (_our_table_type)_func(table, table_len, sizeof(((_our_table_type)0)[0]), name, name_len); \ if (!found) { \ @@ -263,10 +261,9 @@ _our_return_type _our_name(size_t *match_len, _our_table_type table, size_t tabl * @param[in] _our_def_type C type of the default value. * @param[in] _our_out_type C type of the return/output value, i.e. the value part of the element. */ -#define TABLE_TYPE_NAME_MATCH_LEN_FUNC_RPTR(_func, _our_table_type, _our_name, _our_def_type, _our_return_type) \ -bool _our_name(size_t *match_len, _our_out_type **out, _our_table_type table, size_t table_len, char const *name, ssize_t name_len, _our_def_type *def) \ +#define TABLE_TYPE_NAME_MATCH_LEN_FUNC_RPTR(_func, _our_table_type, _our_name, _our_def_type, _our_out_type) \ +bool _our_name(size_t *match_len, _our_out_type *out, _our_table_type table, size_t table_len, char const *name, ssize_t name_len, _our_def_type def) \ { \ - _our_return_type ret; \ _our_table_type found; \ found = (_our_table_type)_func(match_len, table, table_len, sizeof(((_our_table_type)0)[0]), name, name_len); \ if (!found) { \