summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-05 09:34:40 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-05 09:34:40 +0000
commit0d401d4d9cc1a5893a87bb28ef7b0265e6b91008 (patch)
tree319723f23ded8dc16c9e428a7b2c2bf7ccafceb5 /MdeModulePkg/Library
parent721dfef39ec450e2506d40f89178cdc33a5dbb7c (diff)
downloadedk2-platforms-0d401d4d9cc1a5893a87bb28ef7b0265e6b91008.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConsole.c16
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsMisc.c16
2 files changed, 19 insertions, 13 deletions
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;
}