summaryrefslogtreecommitdiffstats
path: root/programs/lz4io.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/lz4io.c')
-rw-r--r--programs/lz4io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index e8eaf60..2ffb541 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -853,17 +853,17 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE
static unsigned long long LZ4IO_passThrough(FILE* finput, FILE* foutput, unsigned char MNstore[MAGICNUMBER_SIZE])
{
size_t buffer[PTSIZET];
- size_t read = 1;
+ size_t readBytes = 1;
unsigned long long total = MAGICNUMBER_SIZE;
unsigned storedSkips = 0;
size_t const sizeCheck = fwrite(MNstore, 1, MAGICNUMBER_SIZE, foutput);
if (sizeCheck != MAGICNUMBER_SIZE) EXM_THROW(50, "Pass-through write error");
- while (read) {
- read = fread(buffer, 1, PTSIZE, finput);
- total += read;
- storedSkips = LZ4IO_fwriteSparse(foutput, buffer, read, storedSkips);
+ while (readBytes) {
+ readBytes = fread(buffer, 1, PTSIZE, finput);
+ total += readBytes;
+ storedSkips = LZ4IO_fwriteSparse(foutput, buffer, readBytes, storedSkips);
}
if (ferror(finput)) EXM_THROW(51, "Read Error")