summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-02-04 17:45:47 +0000
committerDavid Mitchell <davem@iabyn.com>2011-02-06 21:34:43 +0000
commitaf050d753c51544ae412e376ac0ddc65045766d5 (patch)
tree55b285d8755517d741a8d5f3e1f2b535f90d58d8 /pp_hot.c
parentdf34c13a8ee71657716cab3d21a3bbb0edab4e63 (diff)
downloadperl-af050d753c51544ae412e376ac0ddc65045766d5.tar.gz
pp_subst: compact a couple of PUSHes using ?:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 0a2194a5d4..34f7770392 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2279,10 +2279,7 @@ PP(pp_subst)
}
TAINT_IF(rxtainted & 1);
SPAGAIN;
- if (rpm->op_pmflags & PMf_NONDESTRUCT)
- PUSHs(TARG);
- else
- PUSHs(&PL_sv_yes);
+ PUSHs(rpm->op_pmflags & PMf_NONDESTRUCT ? TARG : &PL_sv_yes);
}
else {
do {
@@ -2416,10 +2413,7 @@ PP(pp_subst)
ret_no:
SPAGAIN;
- if (rpm->op_pmflags & PMf_NONDESTRUCT)
- PUSHs(TARG);
- else
- PUSHs(&PL_sv_no);
+ PUSHs(rpm->op_pmflags & PMf_NONDESTRUCT ? TARG : &PL_sv_no);
LEAVE_SCOPE(oldsave);
RETURN;
}