Remove unused unchanged list

unchanged is a slice of []*Files in linkManifestAndChange that is not
used except by appending to. Remove for now, if it is needed later it
can be added at that time.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This commit is contained in:
Matthew Johnson
2018-01-22 12:30:13 -08:00
parent 579fee92b9
commit c927f7f008
+1 -2
View File
@@ -368,7 +368,7 @@ func (m *Manifest) linkPeersAndChange(oldManifest *Manifest, minVersion uint32)
// set previous version to oldManifest version
m.Header.Previous = oldManifest.Header.Version
var unchanged, changed, removed, added []*File
var changed, removed, added []*File
nx := 0 // new manifest file index
ox := 0 // old manifest file index
mFilesLen := len(m.Files)
@@ -390,7 +390,6 @@ func (m *Manifest) linkPeersAndChange(oldManifest *Manifest, minVersion uint32)
if sameFile(nf, of) && of.Version >= minVersion {
// file did not change, set version to the old version
nf.Version = of.Version
unchanged = append(unchanged, nf)
} else {
// if the file isn't exactly the same, record the change
// and update the version