Browse Source

wal: simplify boolean return

Gyu-Ho Lee 9 years ago
parent
commit
3243795522
1 changed files with 1 additions and 4 deletions
  1. 1 4
      wal/wal.go

+ 1 - 4
wal/wal.go

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