summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-12-28 07:55:45 +0000
committerNicholas Clark <nick@ccl4.org>2010-12-28 08:35:37 +0000
commita53904572d7a4d49d78b8fb0a3c739b451faad7e (patch)
tree4876ce6df10668c49c0e7ea612c1c6abbddc4ae2 /pp_hot.c
parent46d2cc544f36e7450798245748cda64959a6b884 (diff)
downloadperl-a53904572d7a4d49d78b8fb0a3c739b451faad7e.tar.gz
Extract the OP_phoney_* code from report_evil_fh() into report_wrongway_fh()
Previously Perl_report_evil_fh()'s body was just an if/else at the top level - a good sign that it is actually implementing two disjoint functions.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 9bc7eaeed1..645c7d2a6b 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -758,7 +758,7 @@ PP(pp_print)
else if (!(fp = IoOFP(io))) {
if (ckWARN2(WARN_CLOSED, WARN_IO)) {
if (IoIFP(io))
- report_evil_fh(gv, io, OP_phoney_INPUT_ONLY);
+ report_wrongway_fh(gv, '<');
else if (ckWARN2(WARN_UNOPENED,WARN_CLOSED))
report_evil_fh(gv, io, PL_op->op_type);
}
@@ -1625,7 +1625,7 @@ Perl_do_readline(pTHX)
else if (type == OP_GLOB)
SP--;
else if (ckWARN(WARN_IO) && IoTYPE(io) == IoTYPE_WRONLY) {
- report_evil_fh(PL_last_in_gv, io, OP_phoney_OUTPUT_ONLY);
+ report_wrongway_fh(PL_last_in_gv, '>');
}
}
if (!fp) {