From 8d28d5f81b81f68a69db1c67e24bcfc092614346 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 13 Dec 2000 17:15:03 +0000 Subject: Constification of the data of a hash table. This means the callback functions need to be constified, and therefore meant a number of easy changes a little everywhere. Now, if someone could explain to me why OBJ_dup() cheats... --- apps/openssl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/openssl.c') diff --git a/apps/openssl.c b/apps/openssl.c index 14cb93ee26..4ec9606a06 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -79,9 +79,9 @@ * functions. */ /* static unsigned long MS_CALLBACK hash(FUNCTION *a); */ -static unsigned long MS_CALLBACK hash(void *a_void); +static unsigned long MS_CALLBACK hash(const void *a_void); /* static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b); */ -static int MS_CALLBACK cmp(void *a_void,void *b_void); +static int MS_CALLBACK cmp(const void *a_void,const void *b_void); static LHASH *prog_init(void ); static int do_cmd(LHASH *prog,int argc,char *argv[]); LHASH *config=NULL; @@ -367,14 +367,14 @@ static LHASH *prog_init(void) } /* static int MS_CALLBACK cmp(FUNCTION *a, FUNCTION *b) */ -static int MS_CALLBACK cmp(void *a_void, void *b_void) +static int MS_CALLBACK cmp(const void *a_void, const void *b_void) { return(strncmp(((FUNCTION *)a_void)->name, ((FUNCTION *)b_void)->name,8)); } /* static unsigned long MS_CALLBACK hash(FUNCTION *a) */ -static unsigned long MS_CALLBACK hash(void *a_void) +static unsigned long MS_CALLBACK hash(const void *a_void) { return(lh_strhash(((FUNCTION *)a_void)->name)); } -- cgit v1.2.3