From 0d401d4d9cc1a5893a87bb28ef7b0265e6b91008 Mon Sep 17 00:00:00 2001 From: gikidy Date: Mon, 5 Jan 2009 09:34:40 +0000 Subject: 1. Add some ASSERT(); 2. Fix some typo. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7184 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/GenericBdsLib/BdsConsole.c | 16 ++++++++-------- MdeModulePkg/Library/GenericBdsLib/BdsMisc.c | 16 +++++++++++----- 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'MdeModulePkg/Library') diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c index f826e6d95c..47de467509 100644 --- a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c +++ b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c @@ -20,8 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param ConVarName The name of the EFI variable. - @retval TRUE Set the EFI variabel as NV type. - @retval FALSE EFI variabel as NV type can be set NonNV. + @retval TRUE Set the EFI variable as NV type. + @retval FALSE EFI variable as NV type can be set NonNV. **/ BOOLEAN IsNvNeed ( @@ -279,8 +279,8 @@ BdsLibConnectConsoleVariable ( /** - This function will search every simpletxt devive in current system, - and make every simpletxt device as pertantial console device. + This function will search every simpletext device in current system, + and make every simpletext device as pertantial console device. **/ VOID @@ -300,7 +300,7 @@ BdsLibConnectAllConsoles ( ConDevicePath = NULL; // - // Update all the console varables + // Update all the console variables // gBS->LocateHandleBuffer ( ByProtocol, @@ -519,8 +519,8 @@ ConvertBmpToGopBlt ( Width++; } - Blt --; - Width --; + Blt--; + Width--; break; case 4: @@ -767,7 +767,7 @@ EnableQuietBoot ( } // - // Caculate the display position according to Attribute. + // Calculate the display position according to Attribute. // switch (Attribute) { case EfiBadgingDisplayAttributeLeftTop: diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c index 9c426e5439..c96867877c 100644 --- a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -59,8 +59,8 @@ BdsLibGetTimeout ( } /** - The function will go through the driver optoin link list, load and start - every driver the driver optoin device path point to. + The function will go through the driver option link list, load and start + every driver the driver option device path point to. @param BdsDriverLists The header of the current driver option link list @@ -166,7 +166,7 @@ BdsLibLoadDrivers ( /** Get the Option Number that does not used. - Try to locate the specific option variable one by one untile find a free number. + Try to locate the specific option variable one by one utile find a free number. @param VariableName Indicate if the boot#### or driver#### option @@ -204,7 +204,7 @@ BdsLibGetFreeOptionNumber ( if (OptionBuffer == NULL) { break; } - Index ++; + Index++; } while (TRUE); return ((UINT16) Index); @@ -508,11 +508,16 @@ BdsLibVariableToOption ( Option->Signature = BDS_LOAD_OPTION_SIGNATURE; Option->DevicePath = AllocateZeroPool (GetDevicePathSize (DevicePath)); + ASSERT(Option->DevicePath != NULL); CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath)); + Option->Attribute = Attribute; Option->Description = AllocateZeroPool (StrSize (Description)); + ASSERT(Option->Description != NULL); CopyMem (Option->Description, Description, StrSize (Description)); + Option->LoadOptions = AllocateZeroPool (LoadOptionsSize); + ASSERT(Option->LoadOptions != NULL); CopyMem (Option->LoadOptions, LoadOptions, LoadOptionsSize); Option->LoadOptionsSize = LoadOptionsSize; @@ -827,7 +832,8 @@ BdsLibOutputStrings ( break; } } - + + VA_END(Args); return Status; } -- cgit v1.2.3