diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:50:02 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:50:02 +0000 |
commit | 018cead199f4ee24f0286cbd033355eae7f8fdae (patch) | |
tree | f0a935bac9c716aa3eed352755efa62e1b2b8206 /decoder.cc | |
parent | Adding debian version 1.16-2. (diff) | |
download | lziprecover-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.cc | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |