summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_api.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-12-24 17:20:54 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-01-11 18:50:27 +0100
commit2a056de832a62f9c6da67779f3764f004df6fdb0 (patch)
tree39cf79ccb16c14d4fdc208f58447a051266a8f66 /crypto/conf/conf_api.c
parentAdd lh_doall inlining (diff)
downloadopenssl-2a056de832a62f9c6da67779f3764f004df6fdb0.tar.xz
openssl-2a056de832a62f9c6da67779f3764f004df6fdb0.zip
Add lh_doall_arg inlining
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/conf/conf_api.c')
-rw-r--r--crypto/conf/conf_api.c16
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);