From d93303a0218394847b29df8700a58dc24681208c Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 9 Jul 1987 01:46:54 +0000 Subject: hash needs to use unsigned values (for bulletproofing) --- server/class.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/class.c') diff --git a/server/class.c b/server/class.c index 0c74ff2..4ab3fcd 100644 --- a/server/class.c +++ b/server/class.c @@ -86,7 +86,7 @@ static Code_t remove_client(), insert_client(); static void free_class(); static ZClientList_t *client_alloc(); static ZClass_t *class_alloc(); -static int hash(); +static unsigned int hash(); /* public routines */ @@ -330,12 +330,12 @@ ZAcl_t *acl; /* the hash function */ -static int +static unsigned int hash(string) char *string; { - register int hval = 0; - register char *cp = string; + register unsigned int hval = 0; + register unsigned char *cp = (unsigned char *) string; while (*cp) hval = (hval + (*cp++) * HASHMUL) % HASHSIZE; -- cgit v1.2.3