raft: use empty slice in unstableEntries in log.go

This commit is contained in:
Xiang Li 2014-11-24 09:04:45 -08:00
parent bc0e72acb9
commit 0a46c70f5d

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.