This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
As report_evil_fh() checks WARN_{CLOSED,UNOPENED}, don't duplicate this.
authorNicholas Clark <nick@ccl4.org>
Tue, 28 Dec 2010 09:50:49 +0000 (09:50 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 Dec 2010 10:04:09 +0000 (10:04 +0000)
commit51087808ceed79175a75ce3a398a755b78f57a75
tree8c7a4646269e7dcc18f10dca6b4a0136c153785f
parent7716c5c554409ba94e8dd56116adbde29e4d5b6c
As report_evil_fh() checks WARN_{CLOSED,UNOPENED}, don't duplicate this.

This trades reduced code size for an extra function call in the error path with
warnings disabled. (And removes a duplicated check for the case of taking the
error path *with* warnings enabled.)

Removing the check from Perl_do_close() does not change behaviour, as io is
NULL there, hence Perl_report_evil_fh() will always be checking WARN_UNOPENED
and setting vile to "unopened".
doio.c
pp_hot.c
pp_sys.c