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

@@ -155,6 +155,7 @@ Returns:
//
// For now, allocate an arbitrarily long buffer
//
BufferLen = 0;
Buffer = EfiLibAllocateZeroPool (0x10000);
if (Buffer == NULL) {
return 0;
@@ -394,14 +395,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 (
@@ -410,7 +412,7 @@ Returns:
(VOID **) &UgaDraw
);
if (EFI_ERROR (Status) || (UgaDraw != NULL)) {
if (EFI_ERROR (Status) || (UgaDraw == NULL)) {
return 0;
}
}
@@ -422,7 +424,7 @@ Returns:
(VOID **) &Sto
);
if (EFI_ERROR (Status) || (Sto != NULL)) {
if (EFI_ERROR (Status) || (Sto == NULL)) {
return 0;
}