From 4452d4be2284c0c14bf5c9f097c5ae355976d20e Mon Sep 17 00:00:00 2001 From: johncming Date: Wed, 20 Mar 2019 09:52:12 +0800 Subject: [PATCH] contrib/raftexample: fix naked return. --- contrib/raftexample/raft.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/raftexample/raft.go b/contrib/raftexample/raft.go index 698714cb494..ca290388bcd 100644 --- a/contrib/raftexample/raft.go +++ b/contrib/raftexample/raft.go @@ -126,7 +126,7 @@ func (rc *raftNode) saveSnap(snap raftpb.Snapshot) error { func (rc *raftNode) entriesToApply(ents []raftpb.Entry) (nents []raftpb.Entry) { if len(ents) == 0 { - return + return ents } firstIdx := ents[0].Index if firstIdx > rc.appliedIndex+1 {