Skip to content

Commit a236a2c

Browse files
authored
Minor tweaks
Made the coed blocks consistent.
1 parent e1f7e51 commit a236a2c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hash/hash_lookup3.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
* @return 32-bit hash result
2222
*/
2323

24-
uint32_t lookup3_32(const char *key, uint32_t seed) {
24+
uint32_t lookup3_32(const char *key, uint32_t seed)
25+
{
2526
uint32_t a, b, c;
2627
a = b = 0x9e3779b9;
2728
c = seed;
@@ -30,7 +31,8 @@ uint32_t lookup3_32(const char *key, uint32_t seed) {
3031

3132
size_t length = strlen(key);
3233

33-
while (length - i >= 12) {
34+
while (length - i >= 12)
35+
{
3436
a += (uint32_t)key[i] | ((uint32_t)key[i+1] << 8) |
3537
((uint32_t)key[i+2] << 16) | ((uint32_t)key[i+3] << 24);
3638
b += (uint32_t)key[i+4] | ((uint32_t)key[i+5] << 8) |
@@ -49,7 +51,8 @@ uint32_t lookup3_32(const char *key, uint32_t seed) {
4951
}
5052

5153
uint32_t remainingA = 0, remainingB = 0, remainingC = 0;
52-
switch (length - i) {
54+
switch (length - i)
55+
{
5356
case 11: remainingC += ((uint32_t)key[i+10]) << 16;
5457
case 10: remainingC += ((uint32_t)key[i+9]) << 8;
5558
case 9: remainingC += (uint32_t)key[i+8];

0 commit comments

Comments
 (0)