Using nxt_lvlhsh_peek() for port hashes.

This commit is contained in:
Igor Sysoev
2018-03-29 16:35:38 +03:00
parent 7205bf4b86
commit 5a9c23e2b4
3 changed files with 7 additions and 19 deletions

View File

@@ -42,13 +42,9 @@ static const nxt_lvlhsh_proto_t lvlhsh_ports_proto nxt_aligned(64) = {
nxt_port_t *
nxt_port_hash_first(nxt_lvlhsh_t *port_hash, nxt_lvlhsh_each_t *lhe)
nxt_port_hash_retrieve(nxt_lvlhsh_t *port_hash)
{
nxt_memzero(lhe, sizeof(nxt_lvlhsh_each_t));
lhe->proto = &lvlhsh_ports_proto;
return nxt_port_hash_next(port_hash, lhe);
return nxt_lvlhsh_retrieve(port_hash, &lvlhsh_ports_proto, NULL);
}