regcomp.c: Simplify expression
authorKarl Williamson <public@khwilliamson.com>
Tue, 14 Jan 2014 19:47:53 +0000 (12:47 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 22 Jan 2014 18:45:58 +0000 (11:45 -0700)
The previous commit has allowed us to remove the separate test for LOC,
and to replace the one for FOLD by ANYOF_LOC_FOLD.  The flags being
tested here can't be true unless LOC is also true, so testing for it is
superfluous.

regcomp.c

index 57a73d8..e271cba 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -14419,7 +14419,7 @@ parseit:
      * invert if there are things such as \w, which aren't known until runtime
      * */
     if (invert
-        && ! (LOC && (FOLD || (ANYOF_FLAGS(ret) & ANYOF_POSIXL)))
+        && ! (ANYOF_FLAGS(ret) & (ANYOF_LOC_FOLD|ANYOF_POSIXL))
        && ! depends_list
        && ! HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION)
     {