raft: follow golint notice to replace +=1 with ++

release-2.3
davygeek 2016-01-13 09:39:00 +08:00
parent 42b5bc021a
commit 194607812c
2 changed files with 3 additions and 3 deletions

View File

@ -220,7 +220,7 @@ func (in *inflights) freeTo(to uint64) {
}
// increase index and maybe rotate
if idx += 1; idx >= in.size {
if idx++; idx >= in.size {
idx -= in.size
}
}

View File

@ -868,12 +868,12 @@ func (r *raft) checkQuorumActive() bool {
for id := range r.prs {
if id == r.id { // self is always active
act += 1
act++
continue
}
if r.prs[id].RecentActive {
act += 1
act++
}
r.prs[id].RecentActive = false