Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-06-25 18:56:14 +0400
committerIgor Sysoev <igor@sysoev.ru>2008-06-25 18:56:14 +0400
commiteb03ea74588aa57fb224e85de50ff41ea63cf420 (patch)
treee38fab060c5d7242e2b56b8469d08bce0f51239b /src
parent3e6f74da0556265b7ad3fbdb629f2898b1e1936f (diff)
refactor obscure code
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_conf_file.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index b32f0f03c..dbeb39d0c 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -145,24 +145,28 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
}
if (rc == NGX_CONF_BLOCK_DONE) {
+
if (!block) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
goto failed;
}
- block = 0;
+ goto done;
}
- if (rc == NGX_CONF_FILE_DONE && block) {
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "unexpected end of file, expecting \"}\"");
- goto failed;
- }
+ if (rc == NGX_CONF_FILE_DONE) {
+
+ if (block) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unexpected end of file, expecting \"}\"");
+ goto failed;
+ }
- if (rc != NGX_OK && rc != NGX_CONF_BLOCK_START) {
goto done;
}
+ /* rc == NGX_OK || rc == NGX_CONF_BLOCK_START */
+
if (cf->handler) {
/*