diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-26 09:22:38 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-26 09:22:38 +0000 |
commit | 0322ed7af8a739263fd27e5ae1862b2b8f7137a5 (patch) | |
tree | 78038dd0397398e00d79920f08f7341a0ceacff1 /MdeModulePkg/Universal | |
parent | e15c65a371286026d80fab12a8382f901adf059f (diff) | |
download | edk2-0322ed7af8a739263fd27e5ae1862b2b8f7137a5.zip edk2-0322ed7af8a739263fd27e5ae1862b2b8f7137a5.tar.gz edk2-0322ed7af8a739263fd27e5ae1862b2b8f7137a5.tar.bz2 |
Check Library usage.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7141 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index 407eefb..eaf13d4 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -763,10 +763,12 @@ CheckModeSupported ( EFI_STATUS Status;
UINTN SizeOfInfo;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
+ UINT32 MaxMode;
- Status = EFI_SUCCESS;
-
- for (ModeNumber = 0; ModeNumber < GraphicsOutput->Mode->MaxMode; ModeNumber++) {
+ Status = EFI_SUCCESS;
+ MaxMode = GraphicsOutput->Mode->MaxMode;
+
+ for (ModeNumber = 0; ModeNumber < MaxMode; ModeNumber++) {
Status = GraphicsOutput->QueryMode (
GraphicsOutput,
ModeNumber,
@@ -778,11 +780,11 @@ CheckModeSupported ( (Info->VerticalResolution == VerticalResolution)) {
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
if (!EFI_ERROR (Status)) {
- gBS->FreePool (Info);
+ FreePool (Info);
break;
}
}
- gBS->FreePool (Info);
+ FreePool (Info);
}
}
|