mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
include/ceph_hash.cc: reduce scope of a var in ceph_str_hash_rjenkins()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
ad2990c48f
commit
cd0f461fd5
@ -83,10 +83,9 @@ unsigned ceph_str_hash_rjenkins(const char *str, unsigned length)
|
||||
unsigned ceph_str_hash_linux(const char *str, unsigned length)
|
||||
{
|
||||
unsigned long hash = 0;
|
||||
unsigned char c;
|
||||
|
||||
while (length--) {
|
||||
c = *str++;
|
||||
unsigned char c = *str++;
|
||||
hash = (hash + (c << 4) + (c >> 4)) * 11;
|
||||
}
|
||||
return hash;
|
||||
|
Loading…
Reference in New Issue
Block a user