summaryrefslogtreecommitdiffstats
path: root/crypto/objects
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-12-24 16:07:21 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-01-11 17:50:27 +0000
commit63c75cd688352b83afd7f874b89139e282647046 (patch)
tree98d1484260069de69440e4f53c8f7406aa1a3140 /crypto/objects
parent62d0577e0d5e3703436d0fba362d516481291810 (diff)
Add lh_doall inlining
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/objects')
-rw-r--r--crypto/objects/o_names.c4
-rw-r--r--crypto/objects/obj_dat.c10
2 files changed, 4 insertions, 10 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index f7216f210e..d63575dc84 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -320,8 +320,6 @@ static void names_lh_free_doall(OBJ_NAME *onp)
OBJ_NAME_remove(onp->name, onp->type);
}
-static IMPLEMENT_LHASH_DOALL_FN(names_lh_free, OBJ_NAME)
-
static void name_funcs_free(NAME_FUNCS *ptr)
{
OPENSSL_free(ptr);
@@ -338,7 +336,7 @@ void OBJ_NAME_cleanup(int type)
down_load = lh_OBJ_NAME_get_down_load(names_lh);
lh_OBJ_NAME_set_down_load(names_lh, 0);
- lh_OBJ_NAME_doall(names_lh, LHASH_DOALL_FN(names_lh_free));
+ lh_OBJ_NAME_doall(names_lh, names_lh_free_doall);
if (type < 0) {
lh_OBJ_NAME_free(names_lh);
sk_NAME_FUNCS_pop_free(name_funcs_stack, name_funcs_free);
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index cbd6e346c1..3983ebe770 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -199,10 +199,6 @@ static void cleanup3_doall(ADDED_OBJ *a)
OPENSSL_free(a);
}
-static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ)
-static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ)
-static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ)
-
/*
* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting to
* use freed up OIDs. If necessary the actual freeing up of OIDs is delayed.
@@ -224,9 +220,9 @@ void OBJ_cleanup(void)
if (added == NULL)
return;
lh_ADDED_OBJ_set_down_load(added, 0);
- lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup1)); /* zero counters */
- lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup2)); /* set counters */
- lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup3)); /* free objects */
+ lh_ADDED_OBJ_doall(added, cleanup1_doall); /* zero counters */
+ lh_ADDED_OBJ_doall(added, cleanup2_doall); /* set counters */
+ lh_ADDED_OBJ_doall(added, cleanup3_doall); /* free objects */
lh_ADDED_OBJ_free(added);
added = NULL;
}