Mercurial > hg > nginx
changeset 4802:6fc86fe0b586 stable-1.2
Merge of r4766, r4767: ngx_http_upstream_add() changes.
*) Fixed to return NULL if an error occurs.
*) Microoptimization: replaced an expression known to be constant with
the constant value.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 06 Aug 2012 17:20:01 +0000 |
parents | 8f2f71233f5b |
children | 92a620dd8036 |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Mon Aug 06 17:15:23 2012 +0000 +++ b/src/http/ngx_http_upstream.c Mon Aug 06 17:20:01 2012 +0000 @@ -4422,18 +4422,18 @@ uscf->servers = ngx_array_create(cf->pool, 1, sizeof(ngx_http_upstream_server_t)); if (uscf->servers == NULL) { - return NGX_CONF_ERROR; + return NULL; } us = ngx_array_push(uscf->servers); if (us == NULL) { - return NGX_CONF_ERROR; + return NULL; } 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);