diff options
author | John Kohl <jtkohl@mit.edu> | 1987-07-09 01:46:54 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1987-07-09 01:46:54 +0000 |
commit | d93303a0218394847b29df8700a58dc24681208c (patch) | |
tree | 1b2e8547f6838b8bd4e56bc10ff9c3e9bed8d761 /server/class.c | |
parent | 3ea78f37dc91324b6cb94073c92adf144e7589ed (diff) |
hash needs to use unsigned values (for bulletproofing)
Diffstat (limited to 'server/class.c')
-rw-r--r-- | server/class.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |