Skip to content

Commit

Permalink
Map: simplified "map" block parser.
Browse files Browse the repository at this point in the history
No functional changes.
  • Loading branch information
mdocguard committed Dec 8, 2016
1 parent 7ef8ca2 commit 41f0684
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/http/modules/ngx_http_map_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/stream/ngx_stream_map_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 41f0684

Please sign in to comment.