Merge pull request #5645 from gyuho/wal_simple

wal: simplify boolean return
This commit is contained in:
Gyu-Ho Lee 2016-06-11 11:10:59 -07:00 committed by GitHub
commit 667093bbd1

View File

@ -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 {