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 /scope.c | |
parent | c20642991d8e8afa0a97a45a55f0f04df68e5245 (diff) | |
download | perl-ef8d46e8143455a8b73aff3ecaa10ca3cf293a4d.tar.gz |
SvREFCNT_dec already checks if the SV is non-NULL (continued)
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -747,9 +747,7 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_AV: /* array reference */ av = MUTABLE_AV(SSPOPPTR); gv = MUTABLE_GV(SSPOPPTR); - if (GvAV(gv)) { - SvREFCNT_dec(GvAV(gv)); - } + SvREFCNT_dec(GvAV(gv)); GvAV(gv) = av; if (SvMAGICAL(av)) { PL_localizing = 2; @@ -760,9 +758,7 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_HV: /* hash reference */ hv = MUTABLE_HV(SSPOPPTR); gv = MUTABLE_GV(SSPOPPTR); - if (GvHV(gv)) { - SvREFCNT_dec(GvHV(gv)); - } + SvREFCNT_dec(GvHV(gv)); GvHV(gv) = hv; if (SvMAGICAL(hv)) { PL_localizing = 2; |