From: Eric Covener Date: Wed, 12 Sep 2018 13:06:00 +0000 (+0000) Subject: move the assignment to the end of the loop. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8167ffff20f98830770313137b13c03d8e485308;p=thirdparty%2Fapache%2Fhttpd.git move the assignment to the end of the loop. This is more readable and isn't miscompiled w/ -O3 on a certain unnamed EBCDIC platforms compiler. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1840678 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/vhost.c b/server/vhost.c index 5b1d8742c5e..9dbd1691f33 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -1041,7 +1041,6 @@ static int update_server_from_aliases(request_rec *r) goto found; } } - last_s = s; /* Fallback: does it match the virthost from the sar? */ if (!strcasecmp(host, sar->virthost)) { @@ -1050,6 +1049,8 @@ static int update_server_from_aliases(request_rec *r) virthost_s = s; } } + + last_s = s; } /* If ServerName and ServerAlias check failed, we end up here. If it