From 8877284863950c2a51d5b076a781437b81cd41e1 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 31 Mar 2014 21:40:35 +0400 Subject: Core: fixed hash to actually try max_size. Previously, maximum size of a hash table built was (max_size - 1). --- src/core/ngx_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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)); -- cgit