mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
wal: simplify boolean return
This commit is contained in:
parent
4aaf7f94cf
commit
3243795522
@ -575,10 +575,7 @@ func mustSync(st, prevst raftpb.HardState, entsnum int) bool {
|
||||
// currentTerm
|
||||
// votedFor
|
||||
// log entries[]
|
||||
if entsnum != 0 || st.Vote != prevst.Vote || st.Term != prevst.Term {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return entsnum != 0 || st.Vote != prevst.Vote || st.Term != prevst.Term
|
||||
}
|
||||
|
||||
func closeAll(rcs ...io.ReadCloser) error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user