This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate mainline
[perl5.git] / util.c
diff --git a/util.c b/util.c
index 3e7b6d3..2668755 100644 (file)
--- a/util.c
+++ b/util.c
@@ -752,7 +752,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
 
 /* start_shift, end_shift are positive quantities which give offsets
    of ends of some substring of bigstr.
-   If `last' we want the last occurence.
+   If `last' we want the last occurrence.
    old_posp is the way of communication between consequent calls if
    the next call needs to find the .
    The initial *old_posp should be -1.
@@ -3458,10 +3458,7 @@ Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op)
     }
 
     if (gv && isGV(gv)) {
-       SV *sv = sv_newmortal();
-       gv_efullname4(sv, gv, Nullch, FALSE);
-        if (SvOK(sv))
-            name = SvPVX(sv);
+       name = GvENAME(gv);
     }
 
     if (op == OP_phoney_OUTPUT_ONLY || op == OP_phoney_INPUT_ONLY) {