From: Maxim Dounin Date: Mon, 31 Mar 2014 17:40:35 +0000 (+0400) Subject: Core: fixed hash to actually try max_size. X-Git-Tag: release-1.5.13~10 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=8877284863950c2a51d5b076a781437b81cd41e1;p=nginx.git Core: fixed hash to actually try max_size. Previously, maximum size of a hash table built was (max_size - 1). --- 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));