forked from lix-project/lix
hoist vector out of loop just in case
This commit is contained in:
parent
c89a3d5368
commit
6b9a03f5d8
|
@ -4154,9 +4154,9 @@ void Worker::waitForInput()
|
||||||
assert(goal);
|
assert(goal);
|
||||||
|
|
||||||
set<int> fds2(j->fds);
|
set<int> fds2(j->fds);
|
||||||
|
std::vector<unsigned char> buffer(4096);
|
||||||
for (auto & k : fds2) {
|
for (auto & k : fds2) {
|
||||||
if (FD_ISSET(k, &fds)) {
|
if (FD_ISSET(k, &fds)) {
|
||||||
std::vector<unsigned char> buffer(4096);
|
|
||||||
ssize_t rd = read(k, buffer.data(), buffer.size());
|
ssize_t rd = read(k, buffer.data(), buffer.size());
|
||||||
if (rd == -1) {
|
if (rd == -1) {
|
||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
|
|
Loading…
Reference in a new issue