From: Jeff Trawick Date: Fri, 21 Nov 2003 03:26:14 +0000 (+0000) Subject: simplify just a bit X-Git-Tag: pre_ajp_proxy~1029 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6159e9455c5215b27e91d1f35a0a3dd59adecdc4;p=thirdparty%2Fapache%2Fhttpd.git simplify just a bit git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101828 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 1a703fba9cb..7a6e9bad438 100644 --- a/server/core.c +++ b/server/core.c @@ -764,10 +764,12 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip) { int hostname_lookups; + int ignored_str_is_ip; - if (str_is_ip) { /* if caller wants to know */ - *str_is_ip = 0; + if (!str_is_ip) { /* caller doesn't want to know */ + str_is_ip = &ignored_str_is_ip; } + *str_is_ip = 0; /* If we haven't checked the host name, and we want to */ if (dir_config) { @@ -827,10 +829,7 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, return NULL; } else { - if (str_is_ip) { /* if caller wants to know */ - *str_is_ip = 1; - } - + *str_is_ip = 1; return conn->remote_ip; } }