diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-20 12:59:35 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-20 14:49:08 -0800 |
commit | b8413ac3c2aeba8d9cbe9ce77d7eafc3f5ae0fef (patch) | |
tree | 18cc5f5c6335ceb7a44e7e6bceb355e532efadbe | |
parent | daa30a688f5d99ab2f3405562a4325687c307066 (diff) | |
download | perl-b8413ac3c2aeba8d9cbe9ce77d7eafc3f5ae0fef.tar.gz |
pp_sys.c:pp_stat: Change scope of havefp var
This is only used in the if(gv != PL_defgv) block now. Also, it was
being used uninitialized for bad iorefs, probably resulting in random warning suppression (untested).
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2759,7 +2759,6 @@ PP(pp_stat) if (PL_op->op_flags & OPf_REF ? (gv = cGVOP_gv, 1) : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) { - bool havefp; if (PL_op->op_type == OP_LSTAT) { if (gv != PL_defgv) { do_fstat_warning_check: @@ -2774,9 +2773,10 @@ PP(pp_stat) Perl_croak(aTHX_ "The stat preceding lstat() wasn't an lstat"); } - havefp = FALSE; if (gv != PL_defgv) { + bool havefp; do_fstat_have_io: + havefp = FALSE; PL_laststype = OP_STAT; PL_statgv = gv ? gv : (GV *)io; sv_setpvs(PL_statname, ""); |