mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: follow golint notice to replace +=1 with ++
This commit is contained in:
parent
42b5bc021a
commit
194607812c
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user