diff options
Diffstat (limited to 'crypto/conf/conf_api.c')
-rw-r--r-- | crypto/conf/conf_api.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/crypto/conf/conf_api.c b/crypto/conf/conf_api.c index 177807556f..eeb2349459 100644 --- a/crypto/conf/conf_api.c +++ b/crypto/conf/conf_api.c @@ -70,11 +70,8 @@ #include <openssl/conf_api.h> #include "e_os.h" -static void value_free_hash_doall_arg(CONF_VALUE *a, - LHASH_OF(CONF_VALUE) *conf); +static void value_free_hash(const CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf); static void value_free_stack_doall(CONF_VALUE *a); -static IMPLEMENT_LHASH_DOALL_ARG_FN(value_free_hash, CONF_VALUE, - LHASH_OF(CONF_VALUE)) /* Up until OpenSSL 0.9.5a, this was get_section */ CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section) @@ -193,6 +190,10 @@ int _CONF_new_data(CONF *conf) return 1; } +typedef LHASH_OF(CONF_VALUE) LH_CONF_VALUE; + +IMPLEMENT_LHASH_DOALL_ARG_CONST(CONF_VALUE, LH_CONF_VALUE); + void _CONF_free_data(CONF *conf) { if (conf == NULL || conf->data == NULL) @@ -200,9 +201,7 @@ void _CONF_free_data(CONF *conf) /* evil thing to make sure the 'OPENSSL_free()' works as expected */ lh_CONF_VALUE_set_down_load(conf->data, 0); - lh_CONF_VALUE_doall_arg(conf->data, - LHASH_DOALL_ARG_FN(value_free_hash), - LHASH_OF(CONF_VALUE), conf->data); + lh_CONF_VALUE_doall_LH_CONF_VALUE(conf->data, value_free_hash, conf->data); /* * We now have only 'section' entries in the hash table. Due to problems @@ -213,8 +212,7 @@ void _CONF_free_data(CONF *conf) lh_CONF_VALUE_free(conf->data); } -static void value_free_hash_doall_arg(CONF_VALUE *a, - LHASH_OF(CONF_VALUE) *conf) +static void value_free_hash(const CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf) { if (a->name != NULL) (void)lh_CONF_VALUE_delete(conf, a); |