diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2017-03-22 23:36:35 +0300 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2017-03-22 23:36:35 +0300 |
| commit | e81ad21fea390cf6f1f2e03223d8df569879dd78 (patch) | |
| tree | eabdd534fbb141b6eda175ffcfb7365b93e375ec /src | |
| parent | abc9d62b03d92129c86f36f068d368e81f89db4e (diff) | |
| download | nginx-e81ad21fea390cf6f1f2e03223d8df569879dd78.tar.gz nginx-e81ad21fea390cf6f1f2e03223d8df569879dd78.tar.bz2 | |
Simplified code about duplicate root/alias directive.
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 1bd3ecd5c..c3957ba38 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -4405,16 +4405,14 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) if (clcf->root.data) { if ((clcf->alias != 0) == alias) { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "\"%V\" directive is duplicate", - &cmd->name); - } else { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "\"%V\" directive is duplicate, " - "\"%s\" directive was specified earlier", - &cmd->name, clcf->alias ? "alias" : "root"); + return "is duplicate"; } + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "\"%V\" directive is duplicate, " + "\"%s\" directive was specified earlier", + &cmd->name, clcf->alias ? "alias" : "root"); + return NGX_CONF_ERROR; } |
