Initialize the local variable before refer to them.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10577 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2010-06-12 03:14:26 +00:00
parent cda8ba5ed7
commit 0ccabf7bab
4 changed files with 20 additions and 9 deletions

View File

@@ -188,6 +188,7 @@ Returns:
//
// For now, allocate an arbitrarily long buffer
//
BufferLen = 0;
Buffer = EfiLibAllocateZeroPool (0x10000);
if (Buffer == NULL) {
return 0;
@@ -428,14 +429,15 @@ Returns:
Handle = gST->ConsoleOutHandle;
GraphicsOutput = NULL;
UgaDraw = NULL;
Status = gBS->HandleProtocol (
Handle,
&gEfiGraphicsOutputProtocolGuid,
(VOID**)&GraphicsOutput
);
UgaDraw = NULL;
if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) || (GraphicsOutput == NULL)) {
GraphicsOutput = NULL;
Status = gBS->HandleProtocol (