Skip to content

Commit

Permalink
Fixed sequence-point-related undefined behaviour (vesoft-inc#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
dutor authored Oct 15, 2019
1 parent 1eb4ded commit 43094c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/meta/processors/admin/AdminClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void AdminClient::getResponse(
LOG(INFO) << "Rpc failure to " << hosts[index]
<< ", retry " << retry
<< ", limit " << retryLimit;
index = ++index % hosts.size();
index = (index + 1) % hosts.size();
getResponse(std::move(hosts),
index,
std::move(req),
Expand Down Expand Up @@ -337,7 +337,7 @@ void AdminClient::getResponse(
LOG(INFO) << "The leader is in election"
<< ", retry " << retry
<< ", limit " << retryLimit;
index = ++index % hosts.size();
index = (index + 1) % hosts.size();
getResponse(std::move(hosts),
index,
std::move(req),
Expand Down Expand Up @@ -385,7 +385,7 @@ void AdminClient::getResponse(
<< " from " << hosts[index]
<< ", retry " << retry
<< ", limit " << retryLimit;
index = ++index % hosts.size();
index = (index + 1) % hosts.size();
getResponse(std::move(hosts),
index,
std::move(req),
Expand Down

0 comments on commit 43094c3

Please sign in to comment.