diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-03-22T12·20+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-03-22T12·32+0100 |
commit | dce8af59a6eec2fbca4033853533277f0be165ee (patch) | |
tree | 3a0bfec4b7c80804fceb908d4eb021f0dfe12e44 /src/libutil/archive.cc | |
parent | f87e286e82f37c3746ba62ba5503db90277eeb6e (diff) |
Tweak
Diffstat (limited to 'src/libutil/archive.cc')
-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); |