diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-01-09 01:24:38 +0100 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-01-09 01:24:38 +0100 |
commit | 3c914840520161d9ca121d38973a79b050916a8a (patch) | |
tree | 54e55c6caf32e0ec88ac04b6a7765f7452fc7739 /crypto/conf/conf_api.c | |
parent | Get rid of the function pointer casting in the debugging memory code due (diff) | |
download | openssl-3c914840520161d9ca121d38973a79b050916a8a.tar.xz openssl-3c914840520161d9ca121d38973a79b050916a8a.zip |
Move all the existing function pointer casts associated with LHASH's two
"doall" functions to using type-safe wrappers. As and where required, this
can be replaced by redeclaring the underlying callbacks to use the
underlying "void"-based prototypes (eg. if performance suffers from an
extra level of function invocation).
Diffstat (limited to 'crypto/conf/conf_api.c')
-rw-r--r-- | crypto/conf/conf_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/conf/conf_api.c b/crypto/conf/conf_api.c index bf84cecc1e..a0596bfd4a 100644 --- a/crypto/conf/conf_api.c +++ b/crypto/conf/conf_api.c @@ -70,6 +70,8 @@ static void value_free_hash(CONF_VALUE *a, LHASH *conf); static void value_free_stack(CONF_VALUE *a,LHASH *conf); +static IMPLEMENT_LHASH_DOALL_ARG_FN(value_free_hash, CONF_VALUE *, LHASH *) +static IMPLEMENT_LHASH_DOALL_ARG_FN(value_free_stack, CONF_VALUE *, LHASH *) /* We don't use function pointer casting or wrapper functions - but cast each * callback parameter inside the callback functions. */ /* static unsigned long hash(CONF_VALUE *v); */ @@ -198,13 +200,13 @@ void _CONF_free_data(CONF *conf) conf->data->down_load=0; /* evil thing to make sure the 'OPENSSL_free()' * works as expected */ - lh_doall_arg(conf->data, (LHASH_DOALL_ARG_FN_TYPE)value_free_hash, + lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(value_free_hash), conf->data); /* We now have only 'section' entries in the hash table. * Due to problems with */ - lh_doall_arg(conf->data, (LHASH_DOALL_ARG_FN_TYPE)value_free_stack, + lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(value_free_stack), conf->data); lh_free(conf->data); } |