summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorVincent Pit <vince@profvince.com>2009-11-05 21:55:35 +0100
committerVincent Pit <vince@profvince.com>2009-11-05 21:55:35 +0100
commitcb39f75f02caa9f23c14dfcac8a46fb1bd154b4f (patch)
tree92de67be7aa5df0102d523dd5ce2509584a30d5d /pp.c
parent6f5be6d1e57649daa9cd098564878b601d687e77 (diff)
downloadperl-cb39f75f02caa9f23c14dfcac8a46fb1bd154b4f.tar.gz
SvREFCNT_dec already checks if the SV is non-NULL
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/pp.c b/pp.c
index d0022fc538..f58c0c5ace 100644
--- a/pp.c
+++ b/pp.c
@@ -349,8 +349,7 @@ PP(pp_pos)
LvTYPE(TARG) = '.';
if (LvTARG(TARG) != sv) {
- if (LvTARG(TARG))
- SvREFCNT_dec(LvTARG(TARG));
+ SvREFCNT_dec(LvTARG(TARG));
LvTARG(TARG) = SvREFCNT_inc_simple(sv);
}
PUSHs(TARG); /* no SvSETMAGIC */
@@ -3226,8 +3225,7 @@ PP(pp_substr)
LvTYPE(TARG) = 'x';
if (LvTARG(TARG) != sv) {
- if (LvTARG(TARG))
- SvREFCNT_dec(LvTARG(TARG));
+ SvREFCNT_dec(LvTARG(TARG));
LvTARG(TARG) = SvREFCNT_inc_simple(sv);
}
LvTARGOFF(TARG) = upos;
@@ -3257,8 +3255,7 @@ PP(pp_vec)
}
LvTYPE(TARG) = 'v';
if (LvTARG(TARG) != src) {
- if (LvTARG(TARG))
- SvREFCNT_dec(LvTARG(TARG));
+ SvREFCNT_dec(LvTARG(TARG));
LvTARG(TARG) = SvREFCNT_inc_simple(src);
}
LvTARGOFF(TARG) = offset;