mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 05:33:52 -06:00
refactor obscure code
This commit is contained in:
parent
3e6f74da05
commit
eb03ea7458
@ -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;
|
||||
}
|
||||
|
||||
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_OK && rc != NGX_CONF_BLOCK_START) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (rc == NGX_CONF_FILE_DONE) {
|
||||
|
||||
if (block) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"unexpected end of file, expecting \"}\"");
|
||||
goto failed;
|
||||
}
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* rc == NGX_OK || rc == NGX_CONF_BLOCK_START */
|
||||
|
||||
if (cf->handler) {
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user