diff options
author | Richard Levitte <levitte@openssl.org> | 2000-12-13 17:15:03 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-12-13 17:15:03 +0000 |
commit | 8d28d5f81b81f68a69db1c67e24bcfc092614346 (patch) | |
tree | 3391f9ea36d1b9655ffd8e9065de14a5284c5556 /crypto/err | |
parent | 53b407da84909dffb54c44dc8a1106723a23a546 (diff) |
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...
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 48eed688a6..1f517cb5f4 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -124,13 +124,13 @@ static LHASH *error_hash=NULL; static LHASH *thread_hash=NULL; /* static unsigned long err_hash(ERR_STRING_DATA *a); */ -static unsigned long err_hash(void *a_void); +static unsigned long err_hash(const void *a_void); /* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b); */ -static int err_cmp(void *a_void, void *b_void); +static int err_cmp(const void *a_void, const void *b_void); /* static unsigned long pid_hash(ERR_STATE *pid); */ -static unsigned long pid_hash(void *pid_void); +static unsigned long pid_hash(const void *pid_void); /* static int pid_cmp(ERR_STATE *a,ERR_STATE *pid); */ -static int pid_cmp(void *a_void,void *pid_void); +static int pid_cmp(const void *a_void,const void *pid_void); static unsigned long get_error_values(int inc,const char **file,int *line, const char **data,int *flags); @@ -626,7 +626,7 @@ const char *ERR_reason_error_string(unsigned long e) } /* static unsigned long err_hash(ERR_STRING_DATA *a) */ -static unsigned long err_hash(void *a_void) +static unsigned long err_hash(const void *a_void) { unsigned long ret,l; @@ -636,20 +636,20 @@ static unsigned long err_hash(void *a_void) } /* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) */ -static int err_cmp(void *a_void, void *b_void) +static int err_cmp(const void *a_void, const void *b_void) { return((int)(((ERR_STRING_DATA *)a_void)->error - ((ERR_STRING_DATA *)b_void)->error)); } /* static unsigned long pid_hash(ERR_STATE *a) */ -static unsigned long pid_hash(void *a_void) +static unsigned long pid_hash(const void *a_void) { return(((ERR_STATE *)a_void)->pid*13); } /* static int pid_cmp(ERR_STATE *a, ERR_STATE *b) */ -static int pid_cmp(void *a_void, void *b_void) +static int pid_cmp(const void *a_void, const void *b_void) { return((int)((long)((ERR_STATE *)a_void)->pid - (long)((ERR_STATE *)b_void)->pid)); |