From f8ffa6d763d26df4961c51e6b2d3325a3ccf651b Mon Sep 17 00:00:00 2001 From: ydong10 Date: Tue, 20 Nov 2012 02:53:21 +0000 Subject: [PATCH] Remove the useless code. Signed-off-by: Dong Eric Reviewed-by: Ye Ting git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13954 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c index 60036e11be..c404054045 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c @@ -1094,7 +1094,6 @@ PeCoffLoaderLoadImage ( UINTN Index; CHAR8 *Base; CHAR8 *End; - CHAR8 *MaxEnd; EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry; EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry; UINTN Size; @@ -1220,7 +1219,7 @@ PeCoffLoaderLoadImage ( // Load each section of the image // Section = FirstSection; - for (Index = 0, MaxEnd = NULL; Index < NumberOfSections; Index++) { + for (Index = 0; Index < NumberOfSections; Index++) { // // Read the section // @@ -1251,10 +1250,6 @@ PeCoffLoaderLoadImage ( End = (CHAR8 *)((UINTN) End + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN)Hdr.Te->StrippedSize); } - if (End > MaxEnd) { - MaxEnd = End; - } - if (Section->SizeOfRawData > 0) { if (!(ImageContext->IsTeImage)) { Status = ImageContext->ImageRead (