refactor obscure code
This commit is contained in:
parent
5868a5320d
commit
29dd032e46
1 changed files with 14 additions and 10 deletions
|
@ -145,24 +145,28 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc == NGX_CONF_BLOCK_DONE) {
|
if (rc == NGX_CONF_BLOCK_DONE) {
|
||||||
|
|
||||||
if (!block) {
|
if (!block) {
|
||||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
|
||||||
goto failed;
|
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;
|
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) {
|
if (cf->handler) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue