| .. | .. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net) |
|---|
| 7 | 7 | * |
|---|
| 8 | | - * http://burtleburtle.net/bob/hash/ |
|---|
| 8 | + * https://burtleburtle.net/bob/hash/ |
|---|
| 9 | 9 | * |
|---|
| 10 | 10 | * These are the credits from Bob's sources: |
|---|
| 11 | 11 | * |
|---|
| .. | .. |
|---|
| 17 | 17 | * if SELF_TEST is defined. You can use this free for any purpose. It's in |
|---|
| 18 | 18 | * the public domain. It has no warranty. |
|---|
| 19 | 19 | * |
|---|
| 20 | | - * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) |
|---|
| 20 | + * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@netfilter.org) |
|---|
| 21 | 21 | * |
|---|
| 22 | 22 | * I've modified Bob's hash to be useful in the Linux kernel, and |
|---|
| 23 | 23 | * any bugs present are my fault. |
|---|
| .. | .. |
|---|
| 86 | 86 | } |
|---|
| 87 | 87 | /* Last block: affect all 32 bits of (c) */ |
|---|
| 88 | 88 | switch (length) { |
|---|
| 89 | | - case 12: c += (u32)k[11]<<24; /* fall through */ |
|---|
| 90 | | - case 11: c += (u32)k[10]<<16; /* fall through */ |
|---|
| 91 | | - case 10: c += (u32)k[9]<<8; /* fall through */ |
|---|
| 92 | | - case 9: c += k[8]; /* fall through */ |
|---|
| 93 | | - case 8: b += (u32)k[7]<<24; /* fall through */ |
|---|
| 94 | | - case 7: b += (u32)k[6]<<16; /* fall through */ |
|---|
| 95 | | - case 6: b += (u32)k[5]<<8; /* fall through */ |
|---|
| 96 | | - case 5: b += k[4]; /* fall through */ |
|---|
| 97 | | - case 4: a += (u32)k[3]<<24; /* fall through */ |
|---|
| 98 | | - case 3: a += (u32)k[2]<<16; /* fall through */ |
|---|
| 99 | | - case 2: a += (u32)k[1]<<8; /* fall through */ |
|---|
| 89 | + case 12: c += (u32)k[11]<<24; fallthrough; |
|---|
| 90 | + case 11: c += (u32)k[10]<<16; fallthrough; |
|---|
| 91 | + case 10: c += (u32)k[9]<<8; fallthrough; |
|---|
| 92 | + case 9: c += k[8]; fallthrough; |
|---|
| 93 | + case 8: b += (u32)k[7]<<24; fallthrough; |
|---|
| 94 | + case 7: b += (u32)k[6]<<16; fallthrough; |
|---|
| 95 | + case 6: b += (u32)k[5]<<8; fallthrough; |
|---|
| 96 | + case 5: b += k[4]; fallthrough; |
|---|
| 97 | + case 4: a += (u32)k[3]<<24; fallthrough; |
|---|
| 98 | + case 3: a += (u32)k[2]<<16; fallthrough; |
|---|
| 99 | + case 2: a += (u32)k[1]<<8; fallthrough; |
|---|
| 100 | 100 | case 1: a += k[0]; |
|---|
| 101 | 101 | __jhash_final(a, b, c); |
|---|
| 102 | + break; |
|---|
| 102 | 103 | case 0: /* Nothing left to add */ |
|---|
| 103 | 104 | break; |
|---|
| 104 | 105 | } |
|---|
| .. | .. |
|---|
| 132 | 133 | |
|---|
| 133 | 134 | /* Handle the last 3 u32's */ |
|---|
| 134 | 135 | switch (length) { |
|---|
| 135 | | - case 3: c += k[2]; /* fall through */ |
|---|
| 136 | | - case 2: b += k[1]; /* fall through */ |
|---|
| 136 | + case 3: c += k[2]; fallthrough; |
|---|
| 137 | + case 2: b += k[1]; fallthrough; |
|---|
| 137 | 138 | case 1: a += k[0]; |
|---|
| 138 | 139 | __jhash_final(a, b, c); |
|---|
| 140 | + break; |
|---|
| 139 | 141 | case 0: /* Nothing left to add */ |
|---|
| 140 | 142 | break; |
|---|
| 141 | 143 | } |
|---|