From: Ruediger Pluem Date: Wed, 29 Apr 2009 16:29:31 +0000 (+0000) Subject: * Don't assign pointers to int's. This is a nightmare when changeing X-Git-Tag: 2.3.3~682 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=300e91f1aba28b2b7b3f3090af1d6057157c5bdf;p=thirdparty%2Fapache%2Fhttpd.git * 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) :-). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@769818 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/metadata/mod_remoteip.c b/modules/metadata/mod_remoteip.c index dd4748bf77b..2db4251c444 100644 --- a/modules/metadata/mod_remoteip.c +++ b/modules/metadata/mod_remoteip.c @@ -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);