summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-29 14:13:03 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-29 14:15:07 +0000
commit0f93bb20132f1d122993dac5d6e249240a28646e (patch)
tree7878c629ab9b5c6457f04339824feb3f57ce1608 /sv.c
parent3ad6135dbb7d518600eac9177c7f007cdfccf5ba (diff)
downloadperl-0f93bb20132f1d122993dac5d6e249240a28646e.tar.gz
In Perl_sv_gets(), shortbuffered is always 0 when rslen is 0.
Hence we can jump past the test C<if (shortbuffered)> after the "this screams louder" block, as that is only reached where rslen is 0.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 5adefc64f7..3c97b801c2 100644
--- a/sv.c
+++ b/sv.c
@@ -7600,6 +7600,8 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append)
bp += cnt; /* screams | dust */
ptr += cnt; /* louder | sed :-) */
cnt = 0;
+ assert (!shortbuffered);
+ goto cannot_be_shortbuffered;
}
}
@@ -7613,6 +7615,7 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append)
continue;
}
+ cannot_be_shortbuffered:
DEBUG_P(PerlIO_printf(Perl_debug_log,
"Screamer: going to getc, ptr=%"UVuf", cnt=%ld\n",
PTR2UV(ptr),(long)cnt));