]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Following the previous commit to the header file, adjust the actual
authorGreg Stein <gstein@apache.org>
Tue, 17 Jun 2003 17:39:10 +0000 (17:39 +0000)
committerGreg Stein <gstein@apache.org>
Tue, 17 Jun 2003 17:39:10 +0000 (17:39 +0000)
parameters of ap_strcmp_match() and ap_strcasecmp_match() to use
'expected' rather than 'exp' to avoid shadowing the global exp()
function.

Submitted by: Justin Erenkrantz <justin@erenkrantz.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@100287 13f79535-47bb-0310-9956-ffa450edef68

server/util.c

index eaac9b80dd4f73ac6a21999ee2d7140849ffc4fd..251eacd6a7774f3bfc2f1edf5ce773af08292654 100644 (file)
@@ -213,50 +213,50 @@ AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt,
  * Based loosely on sections of wildmat.c by Rich Salz
  * Hmmm... shouldn't this really go component by component?
  */
-AP_DECLARE(int) ap_strcmp_match(const char *str, const char *exp)
+AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected)
 {
     int x, y;
 
-    for (x = 0, y = 0; exp[y]; ++y, ++x) {
-        if ((!str[x]) && (exp[y] != '*'))
+    for (x = 0, y = 0; expected[y]; ++y, ++x) {
+        if ((!str[x]) && (expected[y] != '*'))
             return -1;
-        if (exp[y] == '*') {
-            while (exp[++y] == '*');
-            if (!exp[y])
+        if (expected[y] == '*') {
+            while (expected[++y] == '*');
+            if (!expected[y])
                 return 0;
             while (str[x]) {
                 int ret;
-                if ((ret = ap_strcmp_match(&str[x++], &exp[y])) != 1)
+                if ((ret = ap_strcmp_match(&str[x++], &expected[y])) != 1)
                     return ret;
             }
             return -1;
         }
-        else if ((exp[y] != '?') && (str[x] != exp[y]))
+        else if ((expected[y] != '?') && (str[x] != expected[y]))
             return 1;
     }
     return (str[x] != '\0');
 }
 
-AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *exp)
+AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *expected)
 {
     int x, y;
 
-    for (x = 0, y = 0; exp[y]; ++y, ++x) {
-        if (!str[x] && exp[y] != '*')
+    for (x = 0, y = 0; expected[y]; ++y, ++x) {
+        if (!str[x] && expected[y] != '*')
             return -1;
-        if (exp[y] == '*') {
-            while (exp[++y] == '*');
-            if (!exp[y])
+        if (expected[y] == '*') {
+            while (expected[++y] == '*');
+            if (!expected[y])
                 return 0;
             while (str[x]) {
                 int ret;
-                if ((ret = ap_strcasecmp_match(&str[x++], &exp[y])) != 1)
+                if ((ret = ap_strcasecmp_match(&str[x++], &expected[y])) != 1)
                     return ret;
             }
             return -1;
         }
-        else if (exp[y] != '?'
-                 && apr_tolower(str[x]) != apr_tolower(exp[y]))
+        else if (expected[y] != '?'
+                 && apr_tolower(str[x]) != apr_tolower(expected[y]))
             return 1;
     }
     return (str[x] != '\0');