diff options
author | Father Chrysostomos <sprout@cpan.org> | 2015-02-04 22:03:03 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2015-02-05 09:15:16 -0800 |
commit | 84875a28d7b7f4db402f82dd5f607497b00db5e6 (patch) | |
tree | 361ff4d96c3b78ae71a5331049698bd95c05ddb1 /toke.c | |
parent | eabab8bccf871f8e85dfa4a3825827825fb86cd9 (diff) | |
download | perl-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.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -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"); } |