aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libtransport/src/core/memif_connector.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libtransport/src/core/memif_connector.cc b/libtransport/src/core/memif_connector.cc
index 49e1cf027..087e8cba8 100644
--- a/libtransport/src/core/memif_connector.cc
+++ b/libtransport/src/core/memif_connector.cc
@@ -442,7 +442,7 @@ void MemifConnector::send(const Packet::MemBufPtr &packet) {
int MemifConnector::doSend() {
std::size_t max = 0;
- uint16_t n = 0;
+ int32_t n = 0;
std::size_t size = 0;
{
@@ -452,9 +452,9 @@ int MemifConnector::doSend() {
do {
max = size < MAX_MEMIF_BUFS ? size : MAX_MEMIF_BUFS;
+ n = bufferAlloc(max, memif_connection_->tx_qid);
- if (TRANSPORT_EXPECT_FALSE(
- (n = bufferAlloc(max, memif_connection_->tx_qid)) < 0)) {
+ if (TRANSPORT_EXPECT_FALSE(n < 0)) {
TRANSPORT_LOGE("Error allocating buffers.");
return -1;
}