# HG changeset patch # User Ruslan Ermilov # Date 1481207341 -10800 # Node ID 014905eb7b3da3ab8c5d03c5ed296c84e3d75329 # Parent 6eed5ed31e2276379fbbcab69b503d21cb55638c Map: simplified "map" block parser. No functional changes. diff -r 6eed5ed31e22 -r 014905eb7b3d src/http/modules/ngx_http_map_module.c --- a/src/http/modules/ngx_http_map_module.c Thu Dec 08 17:22:07 2016 +0300 +++ b/src/http/modules/ngx_http_map_module.c Thu Dec 08 17:29:01 2016 +0300 @@ -393,8 +393,9 @@ { 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; diff -r 6eed5ed31e22 -r 014905eb7b3d src/stream/ngx_stream_map_module.c --- a/src/stream/ngx_stream_map_module.c Thu Dec 08 17:22:07 2016 +0300 +++ b/src/stream/ngx_stream_map_module.c Thu Dec 08 17:29:01 2016 +0300 @@ -392,8 +392,9 @@ { 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;