diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-29 14:13:03 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-29 14:15:07 +0000 |
commit | 0f93bb20132f1d122993dac5d6e249240a28646e (patch) | |
tree | 7878c629ab9b5c6457f04339824feb3f57ce1608 /sv.c | |
parent | 3ad6135dbb7d518600eac9177c7f007cdfccf5ba (diff) | |
download | perl-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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)); |