mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Invert 'if' statement to reduce nesting.
This commit is contained in:
@@ -129,11 +129,10 @@ namespace DiscImageChef.Partitions
|
||||
Scheme = Name
|
||||
};
|
||||
part.Offset = part.Start * (ulong)sector.Length;
|
||||
if(entry.magic == LINUX_MAGIC || entry.magic == SWAP_MAGIC)
|
||||
{
|
||||
partitions.Add(part);
|
||||
counter++;
|
||||
}
|
||||
if(entry.magic != LINUX_MAGIC && entry.magic != SWAP_MAGIC) continue;
|
||||
|
||||
partitions.Add(part);
|
||||
counter++;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -160,11 +159,10 @@ namespace DiscImageChef.Partitions
|
||||
Scheme = Name
|
||||
};
|
||||
part.Offset = part.Start * (ulong)sector.Length;
|
||||
if(entry.length > 0)
|
||||
{
|
||||
partitions.Add(part);
|
||||
counter++;
|
||||
}
|
||||
if(entry.length <= 0) continue;
|
||||
|
||||
partitions.Add(part);
|
||||
counter++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user