apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1103070 - /apr/apr/trunk/strings/apr_fnmatch.c
Date Sat, 14 May 2011 11:59:33 GMT
Author: wrowe
Date: Sat May 14 11:59:32 2011
New Revision: 1103070

URL: http://svn.apache.org/viewvc?rev=1103070&view=rev
Log:
Fix syntax for legibility as suggested by Stefan.

Modified:
    apr/apr/trunk/strings/apr_fnmatch.c

Modified: apr/apr/trunk/strings/apr_fnmatch.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/strings/apr_fnmatch.c?rev=1103070&r1=1103069&r2=1103070&view=diff
==============================================================================
--- apr/apr/trunk/strings/apr_fnmatch.c (original)
+++ apr/apr/trunk/strings/apr_fnmatch.c Sat May 14 11:59:32 2011
@@ -363,12 +363,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