]> granicus.if.org Git - apache/commitdiff
Reverse the order of 2 tests to potentially save a few cycles.
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 13 Jan 2019 12:51:42 +0000 (12:51 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 13 Jan 2019 12:51:42 +0000 (12:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1851198 13f79535-47bb-0310-9956-ffa450edef68

server/vhost.c

index 9dbd1691f33035d199a60d3f307296b69254fd0f..6d24f2bb5b62be88fe4c28485fbe1d2e06d0504c 100644 (file)
@@ -1042,10 +1042,11 @@ static int update_server_from_aliases(request_rec *r)
             }
         }
 
-        /* Fallback: does it match the virthost from the sar? */
-        if (!strcasecmp(host, sar->virthost)) {
-            /* only the first match is used */
-            if (virthost_s == NULL) {
+        /* Fallback: does it match the virthost from the sar?
+         * (only the first match is used)
+         */
+        if (virthost_s == NULL) {
+            if (!strcasecmp(host, sar->virthost)) {
                 virthost_s = s;
             }
         }