summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-06-09 17:30:56 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-06-09 17:30:56 -0700
commit636013b3f52d8d822c7b83d79398d51b08c82838 (patch)
treec255dc4cb4e5171ec939459c5bac532dcd7f195a /pp_sys.c
parent04f745798a0e989d3948b52426ed936a1b2dfc51 (diff)
downloadperl-636013b3f52d8d822c7b83d79398d51b08c82838.tar.gz
Remove ‘bad top format’ error
This is unreachable. It only happens in pp_leavewrite when IoTOP_GV(io) is null, but the code leading up to it makes sure that IoTOP_GV(io) is not null. If it is still null, it jumps past the error with ‘goto forget_top’.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index b5efeb448d..a6603cec3b 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1470,8 +1470,7 @@ PP(pp_leavewrite)
PL_formtarget = PL_toptarget;
IoFLAGS(io) |= IOf_DIDTOP;
fgv = IoTOP_GV(io);
- if (!fgv)
- DIE(aTHX_ "bad top format reference");
+ assert(fgv); /* IoTOP_GV(io) should have been set above */
cv = GvFORM(fgv);
if (!cv) {
SV * const sv = sv_newmortal();