Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
worstenbrood committed Jan 19, 2016
1 parent 777d6c7 commit 7055bbe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions HuaweiUpdateLibrary/Core/UpdateFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ private void ProcessData(int blockSize, EntryType entryType, Action<byte[], int>
public void AddChecksum(UpdateEntry entry, int blockSize = CrcBlockSize)
{
// Remove existing
var existing = Entries.FindAll(e => e.Type == EntryType.Checksum);
existing.ForEach(e => Remove(e));
Entries.FindAll(e => e.Type == EntryType.Checksum).ForEach(e => Remove(e));

// Set entry type
entry.Type = EntryType.Checksum;
Expand Down Expand Up @@ -370,8 +369,7 @@ public void AddChecksum(UpdateEntry entry, int blockSize = CrcBlockSize)
public void AddSignature(UpdateEntry entry, string algorithm, string keyfile, int blockSize = CrcBlockSize)
{
// Remove existing
var existing = Entries.FindAll(e => e.Type == EntryType.Signature);
existing.ForEach(e => Remove(e));
Entries.FindAll(e => e.Type == EntryType.Signature).ForEach(e => Remove(e));

// Set entry type
entry.Type = EntryType.Signature;
Expand Down

0 comments on commit 7055bbe

Please sign in to comment.