audk/MdeModulePkg/Universal/Disk/PartitionDxe
Laszlo Ersek b4e5807d24 MdeModulePkg/PartitionDxe: remove always false comparison
In the expression

  (RemainderByMediaBlockSize != 0 ||
   Media->BlockSize > UDF_LOGICAL_SECTOR_SIZE)

the second expression is only evaluated if the first expression is false.

If the first expression is false, i.e.,

  RemainderByMediaBlockSize == 0

then UDF_LOGICAL_SECTOR_SIZE is a whole multiple of "Media->BlockSize",
which implies

  UDF_LOGICAL_SECTOR_SIZE >= Media->BlockSize.

Therefore whenever

  Media->BlockSize > UDF_LOGICAL_SECTOR_SIZE

is evaluated, it is false.

The expression

  ((expression) || FALSE)

is equivalent to

  (expression).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-09-12 12:12:31 +02:00
..
ComponentName.c Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid. 2011-07-06 03:55:36 +00:00
ElTorito.c MdeModulePkg/PartitionDxe: Add impl of Partition Information Protocol 2017-07-11 08:43:02 +08:00
Gpt.c MdeModulePkg/PartitionDxe: Add impl of Partition Information Protocol 2017-07-11 08:43:02 +08:00
Mbr.c MdeModulePkg/PartitionDxe: Add impl of Partition Information Protocol 2017-07-11 08:43:02 +08:00
Partition.c MdeModulePkg/PartitionDxe: Add UDF file system support 2017-09-08 20:42:47 +02:00
Partition.h MdeModulePkg/PartitionDxe: Add UDF file system support 2017-09-08 20:42:47 +02:00
PartitionDxe.inf MdeModulePkg/PartitionDxe: Add UDF file system support 2017-09-08 20:42:47 +02:00
PartitionDxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PartitionDxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Udf.c MdeModulePkg/PartitionDxe: remove always false comparison 2017-09-12 12:12:31 +02:00