Map: simplified "map" block parser.

No functional changes.
This commit is contained in:
Ruslan Ermilov 2016-12-08 17:29:01 +03:00
parent 7ef8ca24b5
commit 41f06845cf
2 changed files with 4 additions and 2 deletions

View File

@ -393,8 +393,9 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
{
ctx->hostnames = 1;
return NGX_CONF_OK;
}
} else if (cf->args->nelts != 2) {
if (cf->args->nelts != 2) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid number of the map parameters");
return NGX_CONF_ERROR;

View File

@ -392,8 +392,9 @@ ngx_stream_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
{
ctx->hostnames = 1;
return NGX_CONF_OK;
}
} else if (cf->args->nelts != 2) {
if (cf->args->nelts != 2) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid number of the map parameters");
return NGX_CONF_ERROR;