Code cleanup
This commit is contained in:
parent
74ad10c355
commit
0707720b11
|
@ -86,12 +86,13 @@ void nghttp2_map_entry_init(nghttp2_map_entry *entry, key_type key)
|
|||
entry->next = NULL;
|
||||
}
|
||||
|
||||
/* Same hash function in openjdk HashMap source code. */
|
||||
/* Same hash function in android HashMap source code. */
|
||||
/* The |mod| must be power of 2 */
|
||||
static int32_t hash(int32_t h, int32_t mod)
|
||||
{
|
||||
h ^= (h >> 20) ^ (h >> 12);
|
||||
return (h ^ (h >> 7) ^ (h >> 4)) & (mod - 1);
|
||||
h ^= (h >> 7) ^ (h >> 4);
|
||||
return h & (mod - 1);
|
||||
}
|
||||
|
||||
static int insert(nghttp2_map_entry **table, size_t tablelen,
|
||||
|
|
Loading…
Reference in New Issue