From: Christophe Jaillet Date: Sun, 13 Jan 2019 12:51:42 +0000 (+0000) Subject: Reverse the order of 2 tests to potentially save a few cycles. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d41d452bb8e505d52585ecca7e646eea0f663a6e;p=apache Reverse the order of 2 tests to potentially save a few cycles. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1851198 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/vhost.c b/server/vhost.c index 9dbd1691f3..6d24f2bb5b 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -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; } }