You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2009/04/29 18:29:32 UTC

svn commit: r769818 - /httpd/httpd/trunk/modules/metadata/mod_remoteip.c

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);