summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-03-31 21:40:35 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2014-03-31 21:40:35 +0400
commit8877284863950c2a51d5b076a781437b81cd41e1 (patch)
tree26ed2246adc8440f89de7497cce8af93975537fc /src
parent2a620ae109cb97bd320ad367d9af2d9f7b24090c (diff)
downloadnginx-8877284863950c2a51d5b076a781437b81cd41e1.tar.gz
nginx-8877284863950c2a51d5b076a781437b81cd41e1.tar.bz2
Core: fixed hash to actually try max_size.
Previously, maximum size of a hash table built was (max_size - 1).
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c
index fe95693ab..c7bfed709 100644
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -282,7 +282,7 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts)
start = hinit->max_size - 1000;
}
- for (size = start; size < hinit->max_size; size++) {
+ for (size = start; size <= hinit->max_size; size++) {
ngx_memzero(test, size * sizeof(u_short));