From 97b1719583b3b0e096fdba29573678ac6fd6bae3 Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Mon, 4 Dec 2000 03:02:44 +0000 Subject: Make the remaining LHASH macro changes. This should leave no remaining cases of function pointer casting in lh_new() calls - and leave only the lh_doall and lh_doall_arg cases to be finished. --- crypto/mem_dbg.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'crypto/mem_dbg.c') diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index eb45516bdb..56ce7dddea 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -234,6 +234,9 @@ static unsigned long mem_hash(MEM *a) return(ret); } +static IMPLEMENT_LHASH_HASH_FN(mem_hash, MEM *) +static IMPLEMENT_LHASH_COMP_FN(mem_cmp, MEM *) + static int app_info_cmp(APP_INFO *a, APP_INFO *b) { return(a->thread != b->thread); @@ -249,6 +252,9 @@ static unsigned long app_info_hash(APP_INFO *a) return(ret); } +static IMPLEMENT_LHASH_HASH_FN(app_info_hash, APP_INFO *) +static IMPLEMENT_LHASH_COMP_FN(app_info_cmp, APP_INFO *) + static APP_INFO *pop_info(void) { APP_INFO tmp; @@ -302,8 +308,8 @@ int CRYPTO_push_info_(const char *info, const char *file, int line) } if (amih == NULL) { - if ((amih=lh_new((LHASH_HASH_FN_TYPE)app_info_hash, - (LHASH_COMP_FN_TYPE)app_info_cmp)) == NULL) + if ((amih=lh_new(LHASH_HASH_FN(app_info_hash), + LHASH_COMP_FN(app_info_cmp))) == NULL) { OPENSSL_free(ami); ret=0; @@ -395,8 +401,8 @@ void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, } if (mh == NULL) { - if ((mh=lh_new((LHASH_HASH_FN_TYPE)mem_hash, - (LHASH_COMP_FN_TYPE)mem_cmp)) == NULL) + if ((mh=lh_new(LHASH_HASH_FN(mem_hash), + LHASH_COMP_FN(mem_cmp))) == NULL) { OPENSSL_free(addr); OPENSSL_free(m); -- cgit v1.2.3