Skip to content

Commit aa77209

Browse files
committed
Remove warnings from clang-analyze in connection.cc
Change-Id: Ieb813cda456ec7a7c74ab94d859a4ea6cb174663 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/151105 Tested-by: Build Bot <[email protected]> Reviewed-by: Richard de Mellow <[email protected]>
1 parent 8cb96da commit aa77209

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

daemon/connection.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ void Connection::executeCommandPipeline() {
541541
// Only look at new commands if we don't have any active commands
542542
// or the active command allows for reordering.
543543
auto input = bufferevent_get_input(bev.get());
544-
bool stop = isDCP() ? false : (getSendQueueSize() >= maxSendQueueSize);
544+
bool stop = !isDCP() && (getSendQueueSize() >= maxSendQueueSize);
545545
while (!stop && cookies.size() < maxActiveCommands &&
546546
isPacketAvailable() && numEvents > 0) {
547547
if (!cookies.back()->empty()) {
@@ -565,8 +565,7 @@ void Connection::executeCommandPipeline() {
565565
cookie.reset();
566566
// Check that we're not reserving too much memory for
567567
// this client...
568-
stop = isDCP() ? false
569-
: (getSendQueueSize() >= maxSendQueueSize);
568+
stop = !isDCP() && (getSendQueueSize() >= maxSendQueueSize);
570569
} else {
571570
active = true;
572571
// We need to block so we need to preserve the request
@@ -806,7 +805,7 @@ static std::string getOpenSSLErrors(Connection& c, bufferevent* bev) {
806805
ERR_error_string_n(err, buffer.data(), buffer.size());
807806
ss << "{" << buffer.data() << "},";
808807
messages.emplace_back(ss.str());
809-
};
808+
}
810809

811810
if (messages.empty()) {
812811
return {};

0 commit comments

Comments
 (0)