You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2011/05/14 13:59:33 UTC

svn commit: r1103070 - /apr/apr/trunk/strings/apr_fnmatch.c

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;
     }