Welcome! Log In Create A New Profile

Advanced

[nginx] Simplified code about duplicate root/alias directive.

March 23, 2017 11:30AM
details: http://hg.nginx.org/nginx/rev/6e20a6479325
branches:
changeset: 6941:6e20a6479325
user: Ruslan Ermilov <ru@nginx.com>
date: Wed Mar 22 23:36:35 2017 +0300
description:
Simplified code about duplicate root/alias directive.

diffstat:

src/http/ngx_http_core_module.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)

diffs (26 lines):

diff -r 39ff6939266e -r 6e20a6479325 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Wed Mar 22 22:49:52 2017 +0300
+++ b/src/http/ngx_http_core_module.c Wed Mar 22 23:36:35 2017 +0300
@@ -4405,16 +4405,14 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_c
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;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Simplified code about duplicate root/alias directive.

ru@nginx.com 850 March 23, 2017 11:30AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 318
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready