Skip to content

Commit

Permalink
Remove warnings from clang-analyze in connection.cc
Browse files Browse the repository at this point in the history
Change-Id: Ieb813cda456ec7a7c74ab94d859a4ea6cb174663
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/151105
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>
  • Loading branch information
trondn committed Apr 14, 2021
1 parent 8cb96da commit aa77209
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions daemon/connection.cc
Expand Up @@ -541,7 +541,7 @@ void Connection::executeCommandPipeline() {
// Only look at new commands if we don't have any active commands
// or the active command allows for reordering.
auto input = bufferevent_get_input(bev.get());
bool stop = isDCP() ? false : (getSendQueueSize() >= maxSendQueueSize);
bool stop = !isDCP() && (getSendQueueSize() >= maxSendQueueSize);
while (!stop && cookies.size() < maxActiveCommands &&
isPacketAvailable() && numEvents > 0) {
if (!cookies.back()->empty()) {
Expand All @@ -565,8 +565,7 @@ void Connection::executeCommandPipeline() {
cookie.reset();
// Check that we're not reserving too much memory for
// this client...
stop = isDCP() ? false
: (getSendQueueSize() >= maxSendQueueSize);
stop = !isDCP() && (getSendQueueSize() >= maxSendQueueSize);
} else {
active = true;
// We need to block so we need to preserve the request
Expand Down Expand Up @@ -806,7 +805,7 @@ static std::string getOpenSSLErrors(Connection& c, bufferevent* bev) {
ERR_error_string_n(err, buffer.data(), buffer.size());
ss << "{" << buffer.data() << "},";
messages.emplace_back(ss.str());
};
}

if (messages.empty()) {
return {};
Expand Down

0 comments on commit aa77209

Please sign in to comment.