apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1124317 - /apr/apr/branches/1.5.x/strings/apr_fnmatch.c
Date Wed, 18 May 2011 16:21:27 GMT
Author: wrowe
Date: Wed May 18 16:21:27 2011
New Revision: 1124317

URL: http://svn.apache.org/viewvc?rev=1124317&view=rev
Log:
Backport legibility enhancement from r1103115 (an illegible patch, 
in its own right, due to an svn:eol-style mess on svn cp).

Modified:
    apr/apr/branches/1.5.x/strings/apr_fnmatch.c

Modified: apr/apr/branches/1.5.x/strings/apr_fnmatch.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/strings/apr_fnmatch.c?rev=1124317&r1=1124316&r2=1124317&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/strings/apr_fnmatch.c (original)
+++ apr/apr/branches/1.5.x/strings/apr_fnmatch.c Wed May 18 16:21:27 2011
@@ -118,8 +118,8 @@ static APR_INLINE int fnmatch_ch(const c
 leadingclosebrace:
             /* Look at only well-formed range patterns; 
              * "x-]" is not allowed unless escaped ("x-\]")
+             * XXX: Fix for locale/MBCS character width
              */
-            /* XXX: Fix for locale/MBCS character width */
             if (((*pattern)[1] == '-') && ((*pattern)[2] != ']'))
             {
                 startch = *pattern;
@@ -370,12 +370,12 @@ APR_DECLARE(int) apr_fnmatch(const char 
             }
         }
 
-        if (*string && (!slash || (*string != '/')))
+        if (*string && !(slash && (*string == '/')))
             return APR_FNM_NOMATCH;
 
-        if (*pattern && (!slash || ((*pattern != '/')
-                                    && (!escape || (*pattern != '\\')
-                                                || (pattern[1] != '/')))))
+        if (*pattern && !(slash && ((*pattern == '/')
+                                    || (escape && (*pattern == '\\')
+                                               && (pattern[1] == '/')))))
             return APR_FNM_NOMATCH;
     }
 



Mime
View raw message