diff options
-rw-r--r-- | src/libutil/archive.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index b2459336a885..154e2d20430c 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); |