summaryrefslogtreecommitdiffstats
path: root/apps/openssl.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2000-12-02 23:16:54 +0000
committerGeoff Thorpe <geoff@openssl.org>2000-12-02 23:16:54 +0000
commit35a99b6380231992457f9e4133d3c3e509b85d0d (patch)
treef869c9539da4aefa385c5be4a286e6d081bf9819 /apps/openssl.c
parentdfa46e502dff4b86e6e41fbcc36c561caf20bd2e (diff)
Use the new LHASH macros to declare type-safe wrapper functions that can
be used as the hash/compare callbacks without function pointer casting. For now, this is just happening in the apps/ directory whilst a few people check the approach. The rest of the library will be moved across to the same idea if there's no problems with this.
Diffstat (limited to 'apps/openssl.c')
-rw-r--r--apps/openssl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index 40bcb76341..49d0b2bd1f 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -85,6 +85,9 @@ char *default_config_file=NULL;
BIO *bio_err=NULL;
#endif
+static IMPLEMENT_LHASH_HASH_FN(hash,FUNCTION *);
+static IMPLEMENT_LHASH_COMP_FN(cmp,FUNCTION *);
+
int main(int Argc, char *Argv[])
{
ARGS arg;
@@ -351,8 +354,8 @@ static LHASH *prog_init(void)
;
qsort(functions,i,sizeof *functions,SortFnByName);
- if ((ret=lh_new((LHASH_HASH_FN_TYPE)hash,
- (LHASH_COMP_FN_TYPE)cmp)) == NULL)
+ if ((ret=lh_new(LHASH_HASH_FN(hash),
+ LHASH_COMP_FN(cmp))) == NULL)
return(NULL);
for (f=functions; f->name != NULL; f++)