Mercurial > hg > nginx-quic
diff src/core/nginx.c @ 1704:e584e946e198
move condition declarations inside blocks where they are used
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Dec 2007 12:09:51 +0000 |
parents | 8c696afe46b3 |
children | 7018254cc006 |
line wrap: on
line diff
--- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -758,12 +758,6 @@ ngx_core_module_init_conf(ngx_cycle_t *c { ngx_core_conf_t *ccf = conf; -#if !(NGX_WIN32) - ngx_str_t lock_file; - struct group *grp; - struct passwd *pwd; -#endif - ngx_conf_init_value(ccf->daemon, 1); ngx_conf_init_value(ccf->master, 1); ngx_conf_init_msec_value(ccf->timer_resolution, 0); @@ -796,6 +790,8 @@ ngx_core_module_init_conf(ngx_cycle_t *c #if !(NGX_WIN32) if (ccf->user == (uid_t) NGX_CONF_UNSET_UINT && geteuid() == 0) { + struct group *grp; + struct passwd *pwd; ngx_set_errno(0); pwd = getpwnam(NGX_USER); @@ -848,6 +844,9 @@ ngx_core_module_init_conf(ngx_cycle_t *c return NGX_CONF_ERROR; } + { + ngx_str_t lock_file; + lock_file = cycle->old_cycle->lock_file; if (lock_file.len) { @@ -881,6 +880,7 @@ ngx_core_module_init_conf(ngx_cycle_t *c ccf->lock_file.len), ".accept", sizeof(".accept")); } + } #endif