[nginx] svn commit: r4631 - trunk/src/http

ru at nginx.com ru at nginx.com
Tue May 15 08:11:00 UTC 2012


Author: ru
Date: 2012-05-15 08:10:59 +0000 (Tue, 15 May 2012)
New Revision: 4631
URL: http://trac.nginx.org/nginx/changeset/4631/nginx

Log:
Fixed win32 build after changes in r4624.


Modified:
   trunk/src/http/ngx_http_core_module.c

Modified: trunk/src/http/ngx_http_core_module.c
===================================================================
--- trunk/src/http/ngx_http_core_module.c	2012-05-14 16:30:33 UTC (rev 4630)
+++ trunk/src/http/ngx_http_core_module.c	2012-05-15 08:10:59 UTC (rev 4631)
@@ -2704,7 +2704,7 @@
     u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive)
 {
     u_char           *p;
-    in_addr_t        *inaddr;
+    in_addr_t         inaddr;
     ngx_addr_t        paddr;
     ngx_cidr_t       *cidr;
     ngx_uint_t        family, i;
@@ -2714,7 +2714,7 @@
 #endif
 
 #if (NGX_SUPPRESS_WARN)
-    inaddr = NULL;
+    inaddr = 0;
 #if (NGX_HAVE_INET6)
     inaddr6 = NULL;
 #endif
@@ -2723,7 +2723,7 @@
     family = addr->sockaddr->sa_family;
 
     if (family == AF_INET) {
-        inaddr = &((struct sockaddr_in *) addr->sockaddr)->sin_addr.s_addr;
+        inaddr = ((struct sockaddr_in *) addr->sockaddr)->sin_addr.s_addr;
     }
 
 #if (NGX_HAVE_INET6)
@@ -2732,7 +2732,7 @@
 
         if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
             family = AF_INET;
-            inaddr = (in_addr_t *) &inaddr6->s6_addr[12];
+            inaddr = *(in_addr_t *) &inaddr6->s6_addr[12];
         }
     }
 #endif
@@ -2762,7 +2762,7 @@
 #endif
 
         default: /* AF_INET */
-            if ((*inaddr & cidr[i].u.in.mask) != cidr[i].u.in.addr) {
+            if ((inaddr & cidr[i].u.in.mask) != cidr[i].u.in.addr) {
                 goto next;
             }
             break;



More information about the nginx-devel mailing list