diff options
Diffstat (limited to 'src/lib/util/hash.cpp')
-rw-r--r-- | src/lib/util/hash.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/util/hash.cpp b/src/lib/util/hash.cpp index 9100ff6abde..f2c528e9b22 100644 --- a/src/lib/util/hash.cpp +++ b/src/lib/util/hash.cpp @@ -410,14 +410,13 @@ std::error_condition hash_collection::compute(random_read &stream, uint64_t offs unsigned const chunk_length = std::min(length, sizeof(buffer)); // read one chunk - std::size_t bytes_read; - std::error_condition err = stream.read_at(offset, buffer, chunk_length, bytes_read); + auto const [err, bytes_read] = read_at(stream, offset, buffer, chunk_length); if (err) return err; if (!bytes_read) // EOF? break; offset += bytes_read; - length -= chunk_length; + length -= bytes_read; // append the chunk creator->append(buffer, bytes_read); |