diff options
author | Vincent Pit <vince@profvince.com> | 2009-11-08 15:48:07 +0100 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2009-11-08 15:58:43 +0100 |
commit | ef8d46e8143455a8b73aff3ecaa10ca3cf293a4d (patch) | |
tree | 9a4235cdaec67a513f0058aa796affae779786cd /mg.c | |
parent | c20642991d8e8afa0a97a45a55f0f04df68e5245 (diff) | |
download | perl-ef8d46e8143455a8b73aff3ecaa10ca3cf293a4d.tar.gz |
SvREFCNT_dec already checks if the SV is non-NULL (continued)
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1525,8 +1525,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg) if(i) LEAVE; #endif - if(to_dec) - SvREFCNT_dec(to_dec); + SvREFCNT_dec(to_dec); return 0; } #endif /* !PERL_MICRO */ @@ -2357,8 +2356,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) #endif } else if (strEQ(mg->mg_ptr+1, "NCODING")) { - if (PL_encoding) - SvREFCNT_dec(PL_encoding); + SvREFCNT_dec(PL_encoding); if (SvOK(sv) || SvGMAGICAL(sv)) { PL_encoding = newSVsv(sv); } @@ -2537,8 +2535,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) PL_rs = newSVsv(sv); break; case '\\': - if (PL_ors_sv) - SvREFCNT_dec(PL_ors_sv); + SvREFCNT_dec(PL_ors_sv); if (SvOK(sv) || SvGMAGICAL(sv)) { PL_ors_sv = newSVsv(sv); } |