summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/core/ngx_hash.c
diff options
context:
space:
mode:
authorrobert <robert@openbsd.org>2012-02-18 11:20:21 +0000
committerrobert <robert@openbsd.org>2012-02-18 11:20:21 +0000
commit5fae4203d5006620c06fc511154d915fa178bddc (patch)
tree99af4f7ac830c3cd0f303afe87f92dd20f44e8b5 /usr.sbin/nginx/src/core/ngx_hash.c
parentExtend after recent msdos support. (diff)
downloadwireguard-openbsd-5fae4203d5006620c06fc511154d915fa178bddc.tar.xz
wireguard-openbsd-5fae4203d5006620c06fc511154d915fa178bddc.zip
update to 1.0.12
Diffstat (limited to 'usr.sbin/nginx/src/core/ngx_hash.c')
-rw-r--r--usr.sbin/nginx/src/core/ngx_hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/nginx/src/core/ngx_hash.c b/usr.sbin/nginx/src/core/ngx_hash.c
index 0c7285202fb..7d04f7484f9 100644
--- a/usr.sbin/nginx/src/core/ngx_hash.c
+++ b/usr.sbin/nginx/src/core/ngx_hash.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
*/
@@ -277,7 +278,7 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts)
start = nelts / (bucket_size / (2 * sizeof(void *)));
start = start ? start : 1;
- if (hinit->max_size > 10000 && hinit->max_size / nelts < 100) {
+ if (hinit->max_size > 10000 && nelts && hinit->max_size / nelts < 100) {
start = hinit->max_size - 1000;
}