summaryrefslogtreecommitdiffstats
path: root/decoder.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:49:54 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:49:54 +0000
commitea9b55f6d0c2eb30dffe1a4815d3696d77888b6a (patch)
tree95976219fe7545aeb60f2f8894742193a9927b4b /decoder.cc
parentAdding upstream version 1.16. (diff)
downloadlziprecover-ea9b55f6d0c2eb30dffe1a4815d3696d77888b6a.tar.xz
lziprecover-ea9b55f6d0c2eb30dffe1a4815d3696d77888b6a.zip
Adding upstream version 1.17~pre1.upstream/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;