diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2014-03-19 12:57:40 +0400 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2014-03-19 12:57:40 +0400 |
| commit | 898ca36c3333c16b908d8c1040d1824bf31e2b48 (patch) | |
| tree | 2c7414a512247278944612b0700c83f4efa88bb0 | |
| parent | 062e7a00426e14a116446b71c1418f29796e672b (diff) | |
| download | nginx-898ca36c3333c16b908d8c1040d1824bf31e2b48.tar.gz nginx-898ca36c3333c16b908d8c1040d1824bf31e2b48.tar.bz2 | |
Macros used for initialization in ngx_http_core_init_main_conf().
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index b023bdbc8..e60863788 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, 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); |
