Welcome! Log In Create A New Profile

Advanced

[nginx] Macros used for initialization in ngx_http_core_init_mai...

Maxim Dounin
March 19, 2014 10:38AM
details: http://hg.nginx.org/nginx/rev/68c6cc832c76
branches:
changeset: 5617:68c6cc832c76
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Mar 19 12:57:40 2014 +0400
description:
Macros used for initialization in ngx_http_core_init_main_conf().

diffstat:

src/http/ngx_http_core_module.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)

diffs (34 lines):

diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
--- 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
{
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);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Macros used for initialization in ngx_http_core_init_mai...

Maxim Dounin 527 March 19, 2014 10:38AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready