Simplify the logic to remove the use of local variable "FileInfoGuid" to avoid GCC build warning.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9445 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-11-18 06:01:35 +00:00
parent 550340889f
commit 3d342022a1
1 changed files with 3 additions and 7 deletions

View File

@ -46,7 +46,6 @@ FileHandleGetInfo (
IN EFI_FILE_HANDLE FileHandle
)
{
EFI_GUID FileInfoGuid;
EFI_FILE_INFO *pFileInfo;
UINTN FileInfoSize;
EFI_STATUS Status;
@ -59,11 +58,10 @@ FileHandleGetInfo (
//
// Get the required size to allocate
//
FileInfoGuid = gEfiFileInfoGuid;
FileInfoSize = 0;
pFileInfo = NULL;
Status = FileHandle->GetInfo(FileHandle,
&FileInfoGuid,
&gEfiFileInfoGuid,
&FileInfoSize,
pFileInfo);
//
@ -76,7 +74,7 @@ FileHandleGetInfo (
// now get the information
//
Status = FileHandle->GetInfo(FileHandle,
&FileInfoGuid,
&gEfiFileInfoGuid,
&FileInfoSize,
pFileInfo);
//
@ -114,7 +112,6 @@ FileHandleSetInfo (
IN CONST EFI_FILE_INFO *FileInfo
)
{
EFI_GUID FileInfoGuid;
//
// ASSERT if the FileHandle or FileInfo is NULL
@ -122,12 +119,11 @@ FileHandleSetInfo (
ASSERT (FileHandle != NULL);
ASSERT (FileInfo != NULL);
FileInfoGuid = gEfiFileInfoGuid;
//
// Set the info
//
return (FileHandle->SetInfo(FileHandle,
&FileInfoGuid,
&gEfiFileInfoGuid,
(UINTN)FileInfo->Size,
(EFI_FILE_INFO*)FileInfo));
}