nxt_lvlhsh_each() refactoring and nxt_lvlhsh_each_init().

This commit is contained in:
Igor Sysoev
2018-03-29 16:35:42 +03:00
parent 5a9c23e2b4
commit 5177b085b1
5 changed files with 34 additions and 24 deletions

View File

@@ -187,8 +187,7 @@ nxt_lvlhsh_test(nxt_thread_t *thr, nxt_uint_t n, nxt_bool_t use_pool)
}
}
nxt_memzero(&lhe, sizeof(nxt_lvlhsh_each_t));
lhe.proto = proto;
nxt_lvlhsh_each_init(&lhe, proto);
for (i = 0; i < n + 1; i++) {
if (nxt_lvlhsh_each(&lh, &lhe) == NULL) {