This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove useless code
authorKarl Williamson <public@khwilliamson.com>
Wed, 30 Jan 2013 05:12:21 +0000 (22:12 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 4 Feb 2013 04:41:27 +0000 (21:41 -0700)
This code sets a variable on the C stack, and two statements later
returns, throwing away that variable without ever using the new value.

regcomp.c

index b36b7e4..71d958e 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9092,11 +9092,6 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
                         RExC_flags |= posflags;
                         RExC_flags &= ~negflags;
                        set_regex_charset(&RExC_flags, cs);
-                        if (paren != ':') {
-                            oregflags |= posflags;
-                            oregflags &= ~negflags;
-                           set_regex_charset(&oregflags, cs);
-                        }
                         nextchar(pRExC_state);
                        if (paren != ':') {
                            *flagp = TRYAGAIN;