mirror of https://github.com/acidanthera/audk.git
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:
parent
550340889f
commit
3d342022a1
|
@ -46,7 +46,6 @@ FileHandleGetInfo (
|
||||||
IN EFI_FILE_HANDLE FileHandle
|
IN EFI_FILE_HANDLE FileHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_GUID FileInfoGuid;
|
|
||||||
EFI_FILE_INFO *pFileInfo;
|
EFI_FILE_INFO *pFileInfo;
|
||||||
UINTN FileInfoSize;
|
UINTN FileInfoSize;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -59,11 +58,10 @@ FileHandleGetInfo (
|
||||||
//
|
//
|
||||||
// Get the required size to allocate
|
// Get the required size to allocate
|
||||||
//
|
//
|
||||||
FileInfoGuid = gEfiFileInfoGuid;
|
|
||||||
FileInfoSize = 0;
|
FileInfoSize = 0;
|
||||||
pFileInfo = NULL;
|
pFileInfo = NULL;
|
||||||
Status = FileHandle->GetInfo(FileHandle,
|
Status = FileHandle->GetInfo(FileHandle,
|
||||||
&FileInfoGuid,
|
&gEfiFileInfoGuid,
|
||||||
&FileInfoSize,
|
&FileInfoSize,
|
||||||
pFileInfo);
|
pFileInfo);
|
||||||
//
|
//
|
||||||
|
@ -76,7 +74,7 @@ FileHandleGetInfo (
|
||||||
// now get the information
|
// now get the information
|
||||||
//
|
//
|
||||||
Status = FileHandle->GetInfo(FileHandle,
|
Status = FileHandle->GetInfo(FileHandle,
|
||||||
&FileInfoGuid,
|
&gEfiFileInfoGuid,
|
||||||
&FileInfoSize,
|
&FileInfoSize,
|
||||||
pFileInfo);
|
pFileInfo);
|
||||||
//
|
//
|
||||||
|
@ -114,7 +112,6 @@ FileHandleSetInfo (
|
||||||
IN CONST EFI_FILE_INFO *FileInfo
|
IN CONST EFI_FILE_INFO *FileInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_GUID FileInfoGuid;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ASSERT if the FileHandle or FileInfo is NULL
|
// ASSERT if the FileHandle or FileInfo is NULL
|
||||||
|
@ -122,12 +119,11 @@ FileHandleSetInfo (
|
||||||
ASSERT (FileHandle != NULL);
|
ASSERT (FileHandle != NULL);
|
||||||
ASSERT (FileInfo != NULL);
|
ASSERT (FileInfo != NULL);
|
||||||
|
|
||||||
FileInfoGuid = gEfiFileInfoGuid;
|
|
||||||
//
|
//
|
||||||
// Set the info
|
// Set the info
|
||||||
//
|
//
|
||||||
return (FileHandle->SetInfo(FileHandle,
|
return (FileHandle->SetInfo(FileHandle,
|
||||||
&FileInfoGuid,
|
&gEfiFileInfoGuid,
|
||||||
(UINTN)FileInfo->Size,
|
(UINTN)FileInfo->Size,
|
||||||
(EFI_FILE_INFO*)FileInfo));
|
(EFI_FILE_INFO*)FileInfo));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue