Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 63399 invoked by uid 500); 23 Jun 2002 09:01:23 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 63386 invoked by uid 500); 23 Jun 2002 09:01:23 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 23 Jun 2002 09:01:22 -0000 Message-ID: <20020623090122.62161.qmail@icarus.apache.org> From: brianp@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/include httpd.h X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N brianp 2002/06/23 02:01:22 Modified: server util.c include httpd.h Log: Removed "tolower(++s)" idiom from ap_strcasestr(), to avoid side-effects on any platform with a macro-based tolower() that references its argument multiple times. Revision Changes Path 1.129 +1 -1 httpd-2.0/server/util.c Index: util.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/util.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- util.c 17 May 2002 11:11:37 -0000 1.128 +++ util.c 23 Jun 2002 09:01:21 -0000 1.129 @@ -327,7 +327,7 @@ /* found first character of s2, see if the rest matches */ p1 = (char *)s1; p2 = (char *)s2; - while (apr_tolower(*++p1) == apr_tolower(*++p2)) { + for (++p1, ++p2; apr_tolower(*p1) == apr_tolower(*p2); ++p1, ++p2) { if (*p1 == '\0') { /* both strings ended together */ return((char *)s1); 1.187 +1 -0 httpd-2.0/include/httpd.h Index: httpd.h =================================================================== RCS file: /home/cvs/httpd-2.0/include/httpd.h,v retrieving revision 1.186 retrieving revision 1.187 diff -u -r1.186 -r1.187 --- httpd.h 15 Jun 2002 19:19:42 -0000 1.186 +++ httpd.h 23 Jun 2002 09:01:22 -0000 1.187 @@ -1453,6 +1453,7 @@ * @param s1 The string to search * @param s2 The substring to search for * @return A pointer to the beginning of the substring + * @remark See apr_strmatch() for a faster alternative */ AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2);