[nginx] svn commit: r4722 - in branches/stable-1.2: . src/core
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Jul 2 16:11:02 UTC 2012
Author: mdounin
Date: 2012-07-02 16:11:02 +0000 (Mon, 02 Jul 2012)
New Revision: 4722
URL: http://trac.nginx.org/nginx/changeset/4722/nginx
Log:
Merge of r4653: ngx_inet.c code reduction.
Code reduction (no functional changes).
Modified:
branches/stable-1.2/
branches/stable-1.2/src/core/ngx_inet.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-07-02 15:51:02 UTC (rev 4721)
+++ branches/stable-1.2 2012-07-02 16:11:02 UTC (rev 4722)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4652,4674-4676
+/trunk:4611-4632,4636-4653,4674-4676
\ No newline at end of property
Modified: branches/stable-1.2/src/core/ngx_inet.c
===================================================================
--- branches/stable-1.2/src/core/ngx_inet.c 2012-07-02 15:51:02 UTC (rev 4721)
+++ branches/stable-1.2/src/core/ngx_inet.c 2012-07-02 16:11:02 UTC (rev 4722)
@@ -634,11 +634,8 @@
args = ngx_strlchr(host, last, '?');
if (args) {
- if (uri == NULL) {
+ if (uri == NULL || args < uri) {
uri = args;
-
- } else if (args < uri) {
- uri = args;
}
}
@@ -663,11 +660,6 @@
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 @@
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 @@
len = last - port;
- if (len == 0) {
- u->err = "invalid port";
- return NGX_ERROR;
- }
-
n = ngx_atoi(port, len);
if (n < 1 || n > 65535) {
More information about the nginx-devel
mailing list