From: Paulo Alcantara Date: Wed, 13 Sep 2017 04:44:54 +0000 (+0800) Subject: MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number X-Git-Tag: edk2-stable201903~3423 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=35aec96c221b643b26e78305f6acda8ab0647cf3 MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number This patch gets rid of a negative comparison of an UINT64 type (Offset) as it'll never evaluate to true. Cc: Star Zeng Cc: Eric Dong Cc: Ruiyu Ni Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.1 Reported-by: Star Zeng Signed-off-by: Paulo Alcantara Reviewed-by: Star Zeng --- diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 7286265373..2039f80289 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -1082,9 +1082,6 @@ ReadFile ( if (FilePosition + ExtentLength > ReadFileInfo->FilePosition) { Offset = ReadFileInfo->FilePosition - FilePosition; - if (Offset < 0) { - Offset = -(Offset); - } } else { Offset = 0; }