httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r769818 - /httpd/httpd/trunk/modules/metadata/mod_remoteip.c
Date Wed, 29 Apr 2009 16:29:32 GMT
Author: rpluem
Date: Wed Apr 29 16:29:31 2009
New Revision: 769818

URL: http://svn.apache.org/viewvc?rev=769818&view=rev
Log:
* Don't assign pointers to int's. This is a nightmare when changeing
  between 32 and 64 bit and waiting for an accident to happen.
  Also: It produces compiler warnings (at least 64 bit) :-).

Modified:
    httpd/httpd/trunk/modules/metadata/mod_remoteip.c

Modified: httpd/httpd/trunk/modules/metadata/mod_remoteip.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_remoteip.c?rev=769818&r1=769817&r2=769818&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_remoteip.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_remoteip.c Wed Apr 29 16:29:31 2009
@@ -33,7 +33,7 @@
     /** A proxy IP mask to match */
     apr_ipsubnet_t *ip;
     /** Flagged if internal, otherwise an external trusted proxy */
-    int internal;
+    void  *internal;
 } remoteip_proxymatch_t;
 
 typedef struct {
@@ -141,7 +141,7 @@
     if (!config->proxymatch_ip)
         config->proxymatch_ip = apr_array_make(cmd->pool, 1, sizeof(*match));
     match = (remoteip_proxymatch_t *) apr_array_push(config->proxymatch_ip);
-    match->internal = (int)internal;
+    match->internal = internal;
 
     if (looks_like_ip(ip)) {
         /* Note s may be null, that's fine (explicit host) */
@@ -167,7 +167,7 @@
                 break;
             match = (remoteip_proxymatch_t *) 
                     apr_array_push(config->proxymatch_ip);
-            match->internal = (int)internal;
+            match->internal = internal;
         }
     }
 
@@ -235,7 +235,7 @@
     char *parse_remote;
     char *eos;
     unsigned char *addrbyte;
-    int internal = 0;
+    void *internal = NULL;
 
     apr_pool_userdata_get((void*)&conn, "mod_remoteip-conn", c->pool);
 



Mime
View raw message