Skip to content

Commit

Permalink
Merge pull request #10562 from johncming/naked_return
Browse files Browse the repository at this point in the history
contrib/raftexample: fix naked return.
  • Loading branch information
xiang90 authored Mar 20, 2019
2 parents affaa36 + 4452d4b commit 77d4b74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/raftexample/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 77d4b74

Please sign in to comment.