From c927f7f0083eac6feb18f78424badf49eaa18bbd Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Mon, 22 Jan 2018 11:54:20 -0800 Subject: [PATCH] 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 --- swupd/manifest.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swupd/manifest.go b/swupd/manifest.go index a807e48..fbab75b 100644 --- a/swupd/manifest.go +++ b/swupd/manifest.go @@ -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