raft: use empty slice in unstableEntries in log.go

release-2.0
Xiang Li 2014-11-24 09:04:45 -08:00
parent bc0e72acb9
commit 0a46c70f5d
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ func (l *raftLog) unstableEntries() []pb.Entry {
if len(l.unstableEnts) == 0 {
return nil
}
return append([]pb.Entry(nil), l.unstableEnts...)
return append([]pb.Entry{}, l.unstableEnts...)
}
// nextEnts returns all the available entries for execution.