summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-02-04 22:03:03 -0800
committerFather Chrysostomos <sprout@cpan.org>2015-02-05 09:15:16 -0800
commit84875a28d7b7f4db402f82dd5f607497b00db5e6 (patch)
tree361ff4d96c3b78ae71a5331049698bd95c05ddb1 /toke.c
parenteabab8bccf871f8e85dfa4a3825827825fb86cd9 (diff)
downloadperl-84875a28d7b7f4db402f82dd5f607497b00db5e6.tar.gz
toke.c: Remove redundant PL_lex_stuff null checks
In these three code paths, PL_lex_stuff is never null, so there is no need to check that.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/toke.c b/toke.c
index 3eb6bac039..5373510be9 100644
--- a/toke.c
+++ b/toke.c
@@ -7677,10 +7677,8 @@ Perl_yylex(pTHX)
}
if (!words)
words = newNULLLIST();
- if (PL_lex_stuff) {
- SvREFCNT_dec(PL_lex_stuff);
- PL_lex_stuff = NULL;
- }
+ SvREFCNT_dec_NN(PL_lex_stuff);
+ PL_lex_stuff = NULL;
PL_expect = XOPERATOR;
pl_yylval.opval = sawparens(words);
TOKEN(QWLIST);
@@ -8995,10 +8993,8 @@ S_scan_subst(pTHX_ char *start)
first_line = CopLINE(PL_curcop);
s = scan_str(s,FALSE,FALSE,FALSE,NULL);
if (!s) {
- if (PL_lex_stuff) {
- SvREFCNT_dec(PL_lex_stuff);
- PL_lex_stuff = NULL;
- }
+ SvREFCNT_dec_NN(PL_lex_stuff);
+ PL_lex_stuff = NULL;
Perl_croak(aTHX_ "Substitution replacement not terminated");
}
PL_multi_start = first_start; /* so whole substitution is taken together */
@@ -9077,10 +9073,8 @@ S_scan_trans(pTHX_ char *start)
s = scan_str(s,FALSE,FALSE,FALSE,NULL);
if (!s) {
- if (PL_lex_stuff) {
- SvREFCNT_dec(PL_lex_stuff);
- PL_lex_stuff = NULL;
- }
+ SvREFCNT_dec_NN(PL_lex_stuff);
+ PL_lex_stuff = NULL;
Perl_croak(aTHX_ "Transliteration replacement not terminated");
}