]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
simplify just a bit
authorJeff Trawick <trawick@apache.org>
Fri, 21 Nov 2003 03:26:14 +0000 (03:26 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 21 Nov 2003 03:26:14 +0000 (03:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101828 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index 1a703fba9cbc064bcdd0fc192a32ead2fcba305a..7a6e9bad4385e0c41368e8238c7b18c59dd3c195 100644 (file)
@@ -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;
         }
     }