Commit 0707720b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Code cleanup

parent 74ad10c3
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment