You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2018/09/12 13:06:00 UTC

svn commit: r1840678 - /httpd/httpd/trunk/server/vhost.c

Author: covener
Date: Wed Sep 12 13:06:00 2018
New Revision: 1840678

URL: http://svn.apache.org/viewvc?rev=1840678&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/server/vhost.c

Modified: httpd/httpd/trunk/server/vhost.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/vhost.c?rev=1840678&r1=1840677&r2=1840678&view=diff
==============================================================================
--- httpd/httpd/trunk/server/vhost.c (original)
+++ httpd/httpd/trunk/server/vhost.c Wed Sep 12 13:06:00 2018
@@ -1041,7 +1041,6 @@ static int update_server_from_aliases(re
                 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(re
                 virthost_s = s;
             }
         }
+
+        last_s = s;
     }
 
     /* If ServerName and ServerAlias check failed, we end up here.  If it