summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-12-15 16:24:21 +0000
committerNicholas Clark <nick@ccl4.org>2005-12-15 16:24:21 +0000
commit4634a855caf7cb9c97bd7d7c7bdb72d61fd2e9c0 (patch)
treeaaa3ec48fffe8444b7c8697dc530961f3ab0ecc7 /doio.c
parent95d3daf003b5912b1fa6b2ac441449564fa0d970 (diff)
downloadperl-4634a855caf7cb9c97bd7d7c7bdb72d61fd2e9c0.tar.gz
In Perl_apply, the name of the op can be found from PL_op_name, instead
of using local string constants. p4raw-id: //depot/perl@26369
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/doio.c b/doio.c
index 69aa4c2e62..3445937eaf 100644
--- a/doio.c
+++ b/doio.c
@@ -1565,7 +1565,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
{
register I32 val;
register I32 tot = 0;
- const char *what;
+ const char *const what = PL_op_name[type];
const char *s;
SV ** const oldmark = mark;
@@ -1574,11 +1574,11 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
platforms where kill was not defined. */
#ifndef HAS_KILL
if (type == OP_KILL)
- Perl_die(aTHX_ PL_no_func, "kill");
+ Perl_die(aTHX_ PL_no_func, what);
#endif
#ifndef HAS_CHOWN
if (type == OP_CHOWN)
- Perl_die(aTHX_ PL_no_func, "chown");
+ Perl_die(aTHX_ PL_no_func, what);
#endif
@@ -1599,7 +1599,6 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
}
switch (type) {
case OP_CHMOD:
- what = "chmod";
APPLY_TAINT_PROPER();
if (++mark <= sp) {
val = SvIVx(*mark);
@@ -1638,7 +1637,6 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
break;
#ifdef HAS_CHOWN
case OP_CHOWN:
- what = "chown";
APPLY_TAINT_PROPER();
if (sp - mark > 2) {
register I32 val2;
@@ -1686,7 +1684,6 @@ nothing in the core.
*/
#ifdef HAS_KILL
case OP_KILL:
- what = "kill";
APPLY_TAINT_PROPER();
if (mark == sp)
break;
@@ -1756,7 +1753,6 @@ nothing in the core.
break;
#endif
case OP_UNLINK:
- what = "unlink";
APPLY_TAINT_PROPER();
tot = sp - mark;
while (++mark <= sp) {
@@ -1778,7 +1774,6 @@ nothing in the core.
break;
#if defined(HAS_UTIME) || defined(HAS_FUTIMES)
case OP_UTIME:
- what = "utime";
APPLY_TAINT_PROPER();
if (sp - mark > 2) {
#if defined(HAS_FUTIMES)