Skip to content

Commit

Permalink
Initialize the local variable CurrentPercent with zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Dec 8, 2024
1 parent 908ea74 commit 1968673
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/srcrepair/FrmArchWrk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void UnpackArchive(IProgress<int> Progress)
{
// Creating some counters...
int TotalFiles = Zip.Entries.Count;
int CurrentFile = 1, CurrentPercent, PreviousPercent = 0;
int CurrentFile = 1, CurrentPercent = 0, PreviousPercent = 0;

// Unpacking archive contents...
foreach (ZipArchiveEntry ZFile in Zip.Entries)
Expand Down
2 changes: 1 addition & 1 deletion src/srcrepair/FrmCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private void DeleteCandidates(List<string> DeleteQueue, IProgress<Tuple<int, str

// Creating some counters...
int TotalFiles = DeleteQueue.Count;
int CurrentFile = 1, CurrentPercent, PreviousPercent = 0;
int CurrentFile = 1, CurrentPercent = 0, PreviousPercent = 0;

// Removing all files from list...
foreach (string Fl in DeleteQueue)
Expand Down
2 changes: 1 addition & 1 deletion src/srcrepair/FrmRepBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private void CreateReportFile(IProgress<int> Progress)
{
// Creating local variables for various counters...
int TotalFiles = RepMan.ReportTargets.Count;
int CurrentFile = 1, CurrentPercent, PreviousPercent = 0;
int CurrentFile = 1, CurrentPercent = 0, PreviousPercent = 0;

// Generating reports and adding results to the archive...
foreach (ReportTarget RepTarget in RepMan.ReportTargets)
Expand Down
2 changes: 1 addition & 1 deletion src/srcrepair/FrmRmWrk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void CleanupFiles(IProgress<int> Progress)

// Creating some counters...
int TotalFiles = DeleteQueue.Count;
int CurrentFile = 1, CurrentPercent, PreviousPercent = 0;
int CurrentFile = 1, CurrentPercent = 0, PreviousPercent = 0;

// Removing all files from list...
foreach (string Fl in DeleteQueue)
Expand Down

0 comments on commit 1968673

Please sign in to comment.