This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove redundant assignment
authorKarl Williamson <khw@cpan.org>
Mon, 7 Mar 2016 21:19:42 +0000 (14:19 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 7 Mar 2016 21:29:35 +0000 (14:29 -0700)
The assignment removed here is followed immediately by a goto, and the
target of the goto repeats the assignment, so this one is redundant.

Spotted by Tony Cook

regcomp.c

index 58bf618..60fe4e0 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -15146,7 +15146,6 @@ redo_curchar:
 
                     only_to_avoid_leaks = av_pop(stack);
                     SvREFCNT_dec(only_to_avoid_leaks);
-                    top_index = av_tindex(stack);
 
                     /* And we redo with the inverted operand.  This allows
                      * handling multiple ! in a row */