regexec.c: Remove redundant test
authorKarl Williamson <public@khwilliamson.com>
Tue, 31 Dec 2013 15:42:27 +0000 (08:42 -0700)
committerKarl Williamson <public@khwilliamson.com>
Tue, 31 Dec 2013 16:47:56 +0000 (09:47 -0700)
A string must be in utf8 format if the first code point that came from
it is above 255; therefore it is redundant to test for both.

regexec.c

index fdaa537..d0e0fd2 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -7511,7 +7511,7 @@ S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8* const
      * positive that will be resolved when the match is done again as not part
      * of the synthetic start class */
     if (!match) {
-       if (utf8_target && (flags & ANYOF_ABOVE_LATIN1_ALL) && c >= 256) {
+       if (c >= 256 && (flags & ANYOF_ABOVE_LATIN1_ALL)) {
            match = TRUE;       /* Everything above 255 matches */
        }
        else if (ANYOF_NONBITMAP(n)