This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove always-true test
authorKarl Williamson <public@khwilliamson.com>
Tue, 7 May 2013 16:01:58 +0000 (10:01 -0600)
committerKarl Williamson <public@khwilliamson.com>
Mon, 20 May 2013 17:01:51 +0000 (11:01 -0600)
In this code, j is guaranteed to be above 255, so no need to test for
that.

regcomp.c

index 0b4a75e..bc0e6b3 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -13543,8 +13543,7 @@ parseit:
                          * doesn't allow them between above and below 256 */
                         if ((ASCII_FOLD_RESTRICTED
                                   && (isASCII(c) != isASCII(j)))
-                            || (LOC && ((c < 256) != (j < 256))))
-                        {
+                            || (LOC && c < 256)) {
                             continue;
                         }