[Libreoffice-commits] online.git: loolwsd/LOOLBroker.cpp
Henry Castro
hcastro at collabora.com
Mon Dec 28 13:51:46 PST 2015
loolwsd/LOOLBroker.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 12771ec02d60ca126c8ae3e2e1d2e3babaf3232b
Author: Henry Castro <hcastro at collabora.com>
Date: Mon Dec 28 17:51:38 2015 -0400
loolwsd: remove unnecessary local buffer
diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index 7870116..4ce6bdf 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -402,7 +402,6 @@ public:
void run() override
{
std::string aMessage;
- char aBuffer[1024*2];
char* pStart;
char* pEnd;
@@ -413,8 +412,8 @@ public:
aPoll.events = POLLIN;
aPoll.revents = 0;
- pStart = aBuffer;
- pEnd = aBuffer;
+ pStart = _aBuffer;
+ pEnd = _aBuffer;
static const std::string thread_name = "broker_pipe_reader";
#ifdef __linux
@@ -437,15 +436,15 @@ public:
else
if (aPoll.revents & POLLIN)
{
- nBytes = Util::readFIFO(readerBroker, aBuffer, sizeof(aBuffer));
+ nBytes = Util::readFIFO(readerBroker, _aBuffer, sizeof(_aBuffer));
if (nBytes < 0)
{
pStart = pEnd = nullptr;
Log::error("Error reading message from pipe [" + FIFO_FILE + "].");
continue;
}
- pStart = aBuffer;
- pEnd = aBuffer + nBytes;
+ pStart = _aBuffer;
+ pEnd = _aBuffer + nBytes;
}
else
if (aPoll.revents & (POLLERR | POLLHUP))
More information about the Libreoffice-commits
mailing list