X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FConsole%2FGraphicsConsoleDxe%2FGraphicsConsole.c;h=2fe6dc02dae7578fd8aebe115c5ad272bd27025d;hp=407eefb5ba34ac4a5d73545ad2d4eac81a473e8f;hb=7601dbe7c5ed94c859600649fc316918bb3572b3;hpb=878670eaa686b8d54d8fb4feeda9019b0d7bde31 diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index 407eefb5ba..2fe6dc02da 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); } } @@ -1881,17 +1883,17 @@ EraseCursor ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This ) { - GRAPHICS_CONSOLE_DEV *Private; - EFI_SIMPLE_TEXT_OUTPUT_MODE *CurrentMode; - INTN GlyphX; - INTN GlyphY; + GRAPHICS_CONSOLE_DEV *Private; + EFI_SIMPLE_TEXT_OUTPUT_MODE *CurrentMode; + INTN GlyphX; + INTN GlyphY; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; + EFI_UGA_DRAW_PROTOCOL *UgaDraw; EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Foreground; EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Background; EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION BltChar[EFI_GLYPH_HEIGHT][EFI_GLYPH_WIDTH]; - UINTN PosX; - UINTN PosY; + UINTN PosX; + UINTN PosY; CurrentMode = This->Mode; @@ -1989,8 +1991,8 @@ EraseCursor ( @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurs when executing this entry point. + @retval EFI_SUCCESS The entry point is executed successfully. + @return other Some error occurs when executing this entry point. **/ EFI_STATUS @@ -2015,7 +2017,6 @@ InitializeGraphicsConsole ( ); ASSERT_EFI_ERROR (Status); - return Status; }