diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-07-29 19:44:09 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-07-29 19:44:09 +0000 |
commit | 45d2ae646bf105229ae60d569d28138082dc7baf (patch) | |
tree | 277240f966a3628a0eb3c525a3f0e66e899945dc | |
parent | b1630108729e1f458a06622a474b51e533b34f1c (diff) | |
download | nginx-45d2ae646bf105229ae60d569d28138082dc7baf.tar.gz nginx-45d2ae646bf105229ae60d569d28138082dc7baf.zip |
Slight optimization in ngx_http_upstream_add(): replaced an expression
known to be constant with the constant value.
-rw-r--r-- | src/http/ngx_http_upstream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9ad398117..2cbb2cb93 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4433,7 +4433,7 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags) ngx_memzero(us, sizeof(ngx_http_upstream_server_t)); us->addrs = u->addrs; - us->naddrs = u->naddrs; + us->naddrs = 1; } uscfp = ngx_array_push(&umcf->upstreams); |