diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2011-12-02 22:46:53 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2011-12-02 22:46:53 +0000 |
commit | 29b4be759a1cb9071f684712a745e4b92bd366d0 (patch) | |
tree | 420c69d9e3125fa5ccbd4216e27d200b25f01bed /lib/hash.cc | |
parent | f823497bd9d420a2cf83fa56f5090d4227ba73f5 (diff) |
Notes
Diffstat (limited to 'lib/hash.cc')
-rw-r--r-- | lib/hash.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hash.cc b/lib/hash.cc index b5bb4ad66836..1795cee81c18 100644 --- a/lib/hash.cc +++ b/lib/hash.cc @@ -1,6 +1,6 @@ /* -Copyright (C) 1990, 2000 Free Software Foundation - written by Doug Lea (dl@rocky.oswego.edu) +Copyright (C) 1990, 2000, 2002 Free Software Foundation + written by Doug Lea <dl@rocky.oswego.edu> */ #include <hash.h> @@ -12,14 +12,14 @@ Copyright (C) 1990, 2000 Free Software Foundation */ unsigned int -hashpjw (const char *x, unsigned int len) // From Dragon book, p436 +hashpjw (const unsigned char *x, unsigned int len) // From Dragon book, p436 { unsigned int h = 0; unsigned int g; for (; len > 0; len--) { - h = (h << 4) + (unsigned char) *x++; + h = (h << 4) + *x++; if ((g = h & 0xf0000000) != 0) h = (h ^ (g >> 24)) ^ g; } |