summaryrefslogtreecommitdiffstats
path: root/decoder.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:50:02 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:50:02 +0000
commit018cead199f4ee24f0286cbd033355eae7f8fdae (patch)
treef0a935bac9c716aa3eed352755efa62e1b2b8206 /decoder.cc
parentAdding debian version 1.16-2. (diff)
downloadlziprecover-018cead199f4ee24f0286cbd033355eae7f8fdae.tar.xz
lziprecover-018cead199f4ee24f0286cbd033355eae7f8fdae.zip
Merging upstream version 1.17~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.cc')
-rw-r--r--decoder.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/decoder.cc b/decoder.cc
index 3555a87..f7e8f54 100644
--- a/decoder.cc
+++ b/decoder.cc
@@ -60,8 +60,7 @@ long readblock( const int fd, uint8_t * const buf, const long size )
errno = 0;
while( sz < size )
{
- const int psz = std::min( 65536L, size - sz );
- const int n = read( fd, buf + sz, psz );
+ const int n = read( fd, buf + sz, std::min( 1L << 20, size - sz ) );
if( n > 0 ) sz += n;
else if( n == 0 ) break; // EOF
else if( errno != EINTR ) break;