aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/archive.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/archive.cc')
-rw-r--r--src/libutil/archive.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc
index b2459336a..154e2d204 100644
--- a/src/libutil/archive.cc
+++ b/src/libutil/archive.cc
@@ -44,7 +44,7 @@ static void dumpContents(const Path & path, size_t size,
size_t left = size;
while (left > 0) {
- size_t n = left > buf.size() ? buf.size() : left;
+ auto n = std::min(left, buf.size());
readFull(fd.get(), buf.data(), n);
left -= n;
sink(buf.data(), n);