Mercurial > hg > nginx
changeset 5617:68c6cc832c76
Macros used for initialization in ngx_http_core_init_main_conf().
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 19 Mar 2014 12:57:40 +0400 |
parents | b93db4e4ff77 |
children | c15350f4071c |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 5 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Wed Mar 19 12:57:39 2014 +0400 +++ b/src/http/ngx_http_core_module.c Wed Mar 19 12:57:40 2014 +0400 @@ -3432,25 +3432,16 @@ { 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, 512); + 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);