[nginx] Upstream: removed unnecessary condition in proxy_eval() and friends.
Ruslan Ermilov
ru at nginx.com
Mon Oct 31 20:39:49 UTC 2016
details: http://hg.nginx.org/nginx/rev/1af120241cde
branches:
changeset: 6784:1af120241cde
user: Ruslan Ermilov <ru at nginx.com>
date: Mon Oct 31 18:33:31 2016 +0300
description:
Upstream: removed unnecessary condition in proxy_eval() and friends.
The first condition added in d3454e719bbb should have just replaced
the second one.
diffstat:
src/http/modules/ngx_http_fastcgi_module.c | 2 +-
src/http/modules/ngx_http_proxy_module.c | 2 +-
src/http/modules/ngx_http_scgi_module.c | 2 +-
src/http/modules/ngx_http_uwsgi_module.c | 2 +-
src/stream/ngx_stream_proxy_module.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 9027991e2f37 -r 1af120241cde src/http/modules/ngx_http_fastcgi_module.c
--- a/src/http/modules/ngx_http_fastcgi_module.c Mon Oct 31 16:33:02 2016 +0300
+++ b/src/http/modules/ngx_http_fastcgi_module.c Mon Oct 31 18:33:31 2016 +0300
@@ -766,7 +766,7 @@ ngx_http_fastcgi_eval(ngx_http_request_t
return NGX_ERROR;
}
- if (url.addrs && url.addrs[0].sockaddr) {
+ if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
u->resolved->naddrs = 1;
diff -r 9027991e2f37 -r 1af120241cde src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c Mon Oct 31 16:33:02 2016 +0300
+++ b/src/http/modules/ngx_http_proxy_module.c Mon Oct 31 18:33:31 2016 +0300
@@ -1008,7 +1008,7 @@ ngx_http_proxy_eval(ngx_http_request_t *
return NGX_ERROR;
}
- if (url.addrs && url.addrs[0].sockaddr) {
+ if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
u->resolved->naddrs = 1;
diff -r 9027991e2f37 -r 1af120241cde src/http/modules/ngx_http_scgi_module.c
--- a/src/http/modules/ngx_http_scgi_module.c Mon Oct 31 16:33:02 2016 +0300
+++ b/src/http/modules/ngx_http_scgi_module.c Mon Oct 31 18:33:31 2016 +0300
@@ -562,7 +562,7 @@ ngx_http_scgi_eval(ngx_http_request_t *r
return NGX_ERROR;
}
- if (url.addrs && url.addrs[0].sockaddr) {
+ if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
u->resolved->naddrs = 1;
diff -r 9027991e2f37 -r 1af120241cde src/http/modules/ngx_http_uwsgi_module.c
--- a/src/http/modules/ngx_http_uwsgi_module.c Mon Oct 31 16:33:02 2016 +0300
+++ b/src/http/modules/ngx_http_uwsgi_module.c Mon Oct 31 18:33:31 2016 +0300
@@ -764,7 +764,7 @@ ngx_http_uwsgi_eval(ngx_http_request_t *
return NGX_ERROR;
}
- if (url.addrs && url.addrs[0].sockaddr) {
+ if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
u->resolved->naddrs = 1;
diff -r 9027991e2f37 -r 1af120241cde src/stream/ngx_stream_proxy_module.c
--- a/src/stream/ngx_stream_proxy_module.c Mon Oct 31 16:33:02 2016 +0300
+++ b/src/stream/ngx_stream_proxy_module.c Mon Oct 31 18:33:31 2016 +0300
@@ -578,7 +578,7 @@ ngx_stream_proxy_eval(ngx_stream_session
return NGX_ERROR;
}
- if (url.addrs && url.addrs[0].sockaddr) {
+ if (url.addrs) {
u->resolved->sockaddr = url.addrs[0].sockaddr;
u->resolved->socklen = url.addrs[0].socklen;
u->resolved->naddrs = 1;
More information about the nginx-devel
mailing list