|
@@ -47,28 +47,38 @@ unsigned int ceph_str_hash_rjenkins(const char *str, unsigned int length)
|
|
|
|
|
|
/* handle the last 11 bytes */
|
|
/* handle the last 11 bytes */
|
|
c = c + length;
|
|
c = c + length;
|
|
- switch (len) { /* all the case statements fall through */
|
|
|
|
|
|
+ switch (len) {
|
|
case 11:
|
|
case 11:
|
|
c = c + ((__u32)k[10] << 24);
|
|
c = c + ((__u32)k[10] << 24);
|
|
|
|
+ /* fall through */
|
|
case 10:
|
|
case 10:
|
|
c = c + ((__u32)k[9] << 16);
|
|
c = c + ((__u32)k[9] << 16);
|
|
|
|
+ /* fall through */
|
|
case 9:
|
|
case 9:
|
|
c = c + ((__u32)k[8] << 8);
|
|
c = c + ((__u32)k[8] << 8);
|
|
/* the first byte of c is reserved for the length */
|
|
/* the first byte of c is reserved for the length */
|
|
|
|
+ /* fall through */
|
|
case 8:
|
|
case 8:
|
|
b = b + ((__u32)k[7] << 24);
|
|
b = b + ((__u32)k[7] << 24);
|
|
|
|
+ /* fall through */
|
|
case 7:
|
|
case 7:
|
|
b = b + ((__u32)k[6] << 16);
|
|
b = b + ((__u32)k[6] << 16);
|
|
|
|
+ /* fall through */
|
|
case 6:
|
|
case 6:
|
|
b = b + ((__u32)k[5] << 8);
|
|
b = b + ((__u32)k[5] << 8);
|
|
|
|
+ /* fall through */
|
|
case 5:
|
|
case 5:
|
|
b = b + k[4];
|
|
b = b + k[4];
|
|
|
|
+ /* fall through */
|
|
case 4:
|
|
case 4:
|
|
a = a + ((__u32)k[3] << 24);
|
|
a = a + ((__u32)k[3] << 24);
|
|
|
|
+ /* fall through */
|
|
case 3:
|
|
case 3:
|
|
a = a + ((__u32)k[2] << 16);
|
|
a = a + ((__u32)k[2] << 16);
|
|
|
|
+ /* fall through */
|
|
case 2:
|
|
case 2:
|
|
a = a + ((__u32)k[1] << 8);
|
|
a = a + ((__u32)k[1] << 8);
|
|
|
|
+ /* fall through */
|
|
case 1:
|
|
case 1:
|
|
a = a + k[0];
|
|
a = a + k[0];
|
|
/* case 0: nothing left to add */
|
|
/* case 0: nothing left to add */
|