Code reduction (no functional changes).

This commit is contained in:
Ruslan Ermilov 2012-06-01 11:35:09 +00:00
parent 2195eb554b
commit 887f514e9f

View File

@ -634,10 +634,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
args = ngx_strlchr(host, last, '?');
if (args) {
if (uri == NULL) {
uri = args;
} else if (args < uri) {
if (uri == NULL || args < uri) {
uri = args;
}
}
@ -663,11 +660,6 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
len = last - port;
if (len == 0) {
u->err = "invalid port";
return NGX_ERROR;
}
n = ngx_atoi(port, len);
if (n < 1 || n > 65535) {
@ -774,11 +766,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
return NGX_OK;
}
if (ngx_inet_resolve_host(pool, u) != NGX_OK) {
return NGX_ERROR;
}
return NGX_OK;
return ngx_inet_resolve_host(pool, u);
}
@ -827,11 +815,6 @@ ngx_parse_inet6_url(ngx_pool_t *pool, ngx_url_t *u)
len = last - port;
if (len == 0) {
u->err = "invalid port";
return NGX_ERROR;
}
n = ngx_atoi(port, len);
if (n < 1 || n > 65535) {