summaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index b023bdbc8..bfaa90e76 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3432,25 +3432,16 @@ ngx_http_core_init_main_conf(ngx_conf_t *cf, void *conf)
{
ngx_http_core_main_conf_t *cmcf = conf;
- if (cmcf->server_names_hash_max_size == NGX_CONF_UNSET_UINT) {
- cmcf->server_names_hash_max_size = 512;
- }
-
- if (cmcf->server_names_hash_bucket_size == NGX_CONF_UNSET_UINT) {
- cmcf->server_names_hash_bucket_size = ngx_cacheline_size;
- }
+ ngx_conf_init_uint_value(cmcf->server_names_hash_max_size, 512);
+ ngx_conf_init_uint_value(cmcf->server_names_hash_bucket_size,
+ ngx_cacheline_size);
cmcf->server_names_hash_bucket_size =
ngx_align(cmcf->server_names_hash_bucket_size, ngx_cacheline_size);
- if (cmcf->variables_hash_max_size == NGX_CONF_UNSET_UINT) {
- cmcf->variables_hash_max_size = 512;
- }
-
- if (cmcf->variables_hash_bucket_size == NGX_CONF_UNSET_UINT) {
- cmcf->variables_hash_bucket_size = 64;
- }
+ ngx_conf_init_uint_value(cmcf->variables_hash_max_size, 1024);
+ ngx_conf_init_uint_value(cmcf->variables_hash_bucket_size, 64);
cmcf->variables_hash_bucket_size =
ngx_align(cmcf->variables_hash_bucket_size, ngx_cacheline_size);
@@ -3719,8 +3710,7 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
prev->types_hash_max_size, 1024);
ngx_conf_merge_uint_value(conf->types_hash_bucket_size,
- prev->types_hash_bucket_size,
- ngx_cacheline_size);
+ prev->types_hash_bucket_size, 64);
conf->types_hash_bucket_size = ngx_align(conf->types_hash_bucket_size,
ngx_cacheline_size);