This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
util.c:report_evil_fh: Rmv redundant SvPOK
authorFather Chrysostomos <sprout@cpan.org>
Fri, 25 May 2012 05:46:16 +0000 (22:46 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 7 Jun 2012 15:18:52 +0000 (08:18 -0700)
newSVhek (used to create this SV) always returns an SvPOK scalar.

util.c

diff --git a/util.c b/util.c
index ac7dfbc..671d3b8 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3764,7 +3764,7 @@ Perl_report_evil_fh(pTHX_ const GV *gv)
            (const char *)
            (OP_IS_SOCKET(op) || (io && IoTYPE(io) == IoTYPE_SOCKET)
             ? "socket" : "filehandle");
-       const bool have_name = name && SvPOK(name) && *SvPV_nolen(name);
+       const bool have_name = name && *SvPV_nolen(name);
        Perl_warner(aTHX_ packWARN(warn_type),
                   "%s%s on %s %s%s%"SVf, func, pars, vile, type,
                    have_name ? " " : "",