From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.zytor.com (terminus.zytor.com [65.50.211.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BA81121E8796F for ; Tue, 12 Sep 2017 21:44:46 -0700 (PDT) Received: from localhost.localdomain ([IPv6:2804:7f4:c480:7b3d:0:0:0:2]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id v8D4jNwB009095 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 12 Sep 2017 21:45:26 -0700 From: Paulo Alcantara To: edk2-devel@lists.01.org Cc: Paulo Alcantara , Star Zeng , Eric Dong , Ruiyu Ni , Dandan Bi Date: Wed, 13 Sep 2017 01:44:54 -0300 Message-Id: <8c5a7ec1d6f908eabda755bb6d3bc9a28b14210e.1505277490.git.pcacjr@zytor.com> X-Mailer: git-send-email 2.11.0 Subject: [PATCH] MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 04:44:46 -0000 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 --- MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 3 --- 1 file changed, 3 deletions(-) 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; } -- 2.11.0