aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-03-01 18:58:41 -0600
committerWill Dietz <w@wdtz.org>2018-03-02 10:52:05 -0600
commit6b9a03f5d878ae434b54bb883b51e28082dc30b3 (patch)
tree7fb2bb691217aee150ddd8dc2e78899d91813a78 /src/libstore/build.cc
parentc89a3d536891da84403b025c70f1ae225faa0eb2 (diff)
hoist vector out of loop just in case
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index b33649e6b..a1654917d 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -4154,9 +4154,9 @@ void Worker::waitForInput()
assert(goal);
set<int> fds2(j->fds);
+ std::vector<unsigned char> buffer(4096);
for (auto & k : fds2) {
if (FD_ISSET(k, &fds)) {
- std::vector<unsigned char> buffer(4096);
ssize_t rd = read(k, buffer.data(), buffer.size());
if (rd == -1) {
if (errno != EINTR)