aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/err/err.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2000-12-04 03:02:44 +0000
committerGeoff Thorpe <geoff@openssl.org>2000-12-04 03:02:44 +0000
commit97b1719583b3b0e096fdba29573678ac6fd6bae3 (patch)
tree3b3f24532f736677ac53571f55dfe0ef8935be63 /crypto/err/err.c
parentb0dc680f71db4f79c01b41975f869f7346542098 (diff)
downloadopenssl-97b1719583b3b0e096fdba29573678ac6fd6bae3.tar.gz
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.
Diffstat (limited to 'crypto/err/err.c')
-rw-r--r--crypto/err/err.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 34f4adaeb2..3b4de23775 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -129,6 +129,12 @@ static unsigned long pid_hash(ERR_STATE *pid);
static int pid_cmp(ERR_STATE *a,ERR_STATE *pid);
static unsigned long get_error_values(int inc,const char **file,int *line,
const char **data,int *flags);
+
+static IMPLEMENT_LHASH_HASH_FN(err_hash, ERR_STRING_DATA *)
+static IMPLEMENT_LHASH_COMP_FN(err_cmp, ERR_STRING_DATA *)
+static IMPLEMENT_LHASH_HASH_FN(pid_hash, ERR_STATE *)
+static IMPLEMENT_LHASH_COMP_FN(pid_cmp, ERR_STATE *)
+
static void ERR_STATE_free(ERR_STATE *s);
#ifndef NO_ERR
static ERR_STRING_DATA ERR_str_libraries[]=
@@ -316,8 +322,8 @@ void ERR_load_strings(int lib, ERR_STRING_DATA *str)
if (error_hash == NULL)
{
CRYPTO_w_lock(CRYPTO_LOCK_ERR_HASH);
- error_hash=lh_new((LHASH_HASH_FN_TYPE)err_hash,
- (LHASH_COMP_FN_TYPE)err_cmp);
+ error_hash=lh_new(LHASH_HASH_FN(err_hash),
+ LHASH_COMP_FN(err_cmp));
if (error_hash == NULL)
{
CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH);
@@ -707,8 +713,8 @@ ERR_STATE *ERR_get_state(void)
/* no entry yet in thread_hash for current thread -
* thus, it may have changed since we last looked at it */
if (thread_hash == NULL)
- thread_hash = lh_new((LHASH_HASH_FN_TYPE)pid_hash,
- (LHASH_COMP_FN_TYPE)pid_cmp);
+ thread_hash = lh_new(LHASH_HASH_FN(pid_hash),
+ LHASH_COMP_FN(pid_cmp));
if (thread_hash == NULL)
thread_state_exists = 0; /* allocation error */
else