mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
contrib/raftexample: fix naked return.
This commit is contained in:
parent
09d0844379
commit
4452d4be22
@ -126,7 +126,7 @@ func (rc *raftNode) saveSnap(snap raftpb.Snapshot) error {
|
|||||||
|
|
||||||
func (rc *raftNode) entriesToApply(ents []raftpb.Entry) (nents []raftpb.Entry) {
|
func (rc *raftNode) entriesToApply(ents []raftpb.Entry) (nents []raftpb.Entry) {
|
||||||
if len(ents) == 0 {
|
if len(ents) == 0 {
|
||||||
return
|
return ents
|
||||||
}
|
}
|
||||||
firstIdx := ents[0].Index
|
firstIdx := ents[0].Index
|
||||||
if firstIdx > rc.appliedIndex+1 {
|
if firstIdx > rc.appliedIndex+1 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user