]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Don't assign pointers to int's. This is a nightmare when changeing
authorRuediger Pluem <rpluem@apache.org>
Wed, 29 Apr 2009 16:29:31 +0000 (16:29 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 29 Apr 2009 16:29:31 +0000 (16:29 +0000)
  between 32 and 64 bit and waiting for an accident to happen.
  Also: It produces compiler warnings (at least 64 bit) :-).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@769818 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_remoteip.c

index dd4748bf77b288e62ccec9434c96c73579948cba..2db4251c444d10224539e2ae15546b3bfa7848dc 100644 (file)
@@ -33,7 +33,7 @@ typedef struct {
     /** 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 @@ static const char *proxies_set(cmd_parms *cmd, void *internal,
     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 @@ static const char *proxies_set(cmd_parms *cmd, void *internal,
                 break;
             match = (remoteip_proxymatch_t *) 
                     apr_array_push(config->proxymatch_ip);
-            match->internal = (int)internal;
+            match->internal = internal;
         }
     }
 
@@ -235,7 +235,7 @@ static int remoteip_modify_connection(request_rec *r)
     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);