diff options
author | Geoff Thorpe <geoff@openssl.org> | 2000-12-01 20:31:52 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2000-12-01 20:31:52 +0000 |
commit | 385d81380cb8aa062b9d7e2c678419623c7db484 (patch) | |
tree | f866963b5b03410694d03a37d20695327a72a460 /ssl/ssl_lib.c | |
parent | 862e973b50e56d9510cfebc220cf410d3d5e99bc (diff) |
First step in tidying up the LHASH code. The callback prototypes (and
casts) used in the lhash code are about as horrible and evil as they can
be. For starters, the callback prototypes contain empty parameter lists.
Yuck.
This first change defines clearer prototypes - including "typedef"'d
function pointer types to use as "hash" and "compare" callbacks, as well as
the callbacks passed to the lh_doall and lh_doall_arg iteration functions.
Now at least more explicit (and clear) casting is required in all of the
dependant code - and that should be included in this commit.
The next step will be to hunt down and obliterate some of the function
pointer casting being used when it's not necessary - a particularly evil
variant exists in the implementation of lh_doall.
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 866cd182d4..28a1c67cd7 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1164,7 +1164,8 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) ret->default_passwd_callback_userdata=NULL; ret->client_cert_cb=NULL; - ret->sessions=lh_new(SSL_SESSION_hash,SSL_SESSION_cmp); + ret->sessions=lh_new((LHASH_HASH_FN_TYPE)SSL_SESSION_hash, + (LHASH_COMP_FN_TYPE)SSL_SESSION_cmp); if (ret->sessions == NULL) goto err; ret->cert_store=X509_STORE_new(); if (ret->cert_store == NULL) goto err; |