Merge pull request #5645 from gyuho/wal_simple
wal: simplify boolean return
This commit is contained in:
@ -575,10 +575,7 @@ func mustSync(st, prevst raftpb.HardState, entsnum int) bool {
|
|||||||
// currentTerm
|
// currentTerm
|
||||||
// votedFor
|
// votedFor
|
||||||
// log entries[]
|
// log entries[]
|
||||||
if entsnum != 0 || st.Vote != prevst.Vote || st.Term != prevst.Term {
|
return entsnum != 0 || st.Vote != prevst.Vote || st.Term != prevst.Term
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func closeAll(rcs ...io.ReadCloser) error {
|
func closeAll(rcs ...io.ReadCloser) error {
|
||||||
|
Reference in New Issue
Block a user