]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Add some ASSERT();
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 5 Jan 2009 09:34:40 +0000 (09:34 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 5 Jan 2009 09:34:40 +0000 (09:34 +0000)
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
MdeModulePkg/Library/GenericBdsLib/BdsMisc.c

index f826e6d95c84d5a3a359bce3a43123217879eef3..47de4675093dabb82a756a4689018e96133a8341 100644 (file)
@@ -20,8 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
   @param ConVarName The name of the EFI variable.\r
 \r
-  @retval TRUE    Set the EFI variabel as NV type.\r
-  @retval FALSE   EFI variabel as NV type can be set NonNV.\r
+  @retval TRUE    Set the EFI variable as NV type.\r
+  @retval FALSE   EFI variable as NV type can be set NonNV.\r
 **/\r
 BOOLEAN\r
 IsNvNeed (\r
@@ -279,8 +279,8 @@ BdsLibConnectConsoleVariable (
 \r
 \r
 /**\r
-  This function will search every simpletxt devive in current system,\r
-  and make every simpletxt device as pertantial console device.\r
+  This function will search every simpletext device in current system,\r
+  and make every simpletext device as pertantial console device.\r
 \r
 **/\r
 VOID\r
@@ -300,7 +300,7 @@ BdsLibConnectAllConsoles (
   ConDevicePath = NULL;\r
 \r
   //\r
-  // Update all the console varables\r
+  // Update all the console variables\r
   //\r
   gBS->LocateHandleBuffer (\r
           ByProtocol,\r
@@ -519,8 +519,8 @@ ConvertBmpToGopBlt (
           Width++;\r
         }\r
 \r
-        Blt --;\r
-        Width --;\r
+        Blt--;\r
+        Width--;\r
         break;\r
 \r
       case 4:\r
@@ -767,7 +767,7 @@ EnableQuietBoot (
     }\r
 \r
     //\r
-    // Caculate the display position according to Attribute.\r
+    // Calculate the display position according to Attribute.\r
     //\r
     switch (Attribute) {\r
     case EfiBadgingDisplayAttributeLeftTop:\r
index 9c426e543901ceb87dfbe095146bf3125675bda7..c96867877cd3bd68c0ba5536f66ed152cf4bb297 100644 (file)
@@ -59,8 +59,8 @@ BdsLibGetTimeout (
 }\r
 \r
 /**\r
-  The function will go through the driver optoin link list, load and start\r
-  every driver the driver optoin device path point to.\r
+  The function will go through the driver option link list, load and start\r
+  every driver the driver option device path point to.\r
 \r
   @param  BdsDriverLists        The header of the current driver option link list\r
 \r
@@ -166,7 +166,7 @@ BdsLibLoadDrivers (
 \r
 /**\r
   Get the Option Number that does not used.\r
-  Try to locate the specific option variable one by one untile find a free number.\r
+  Try to locate the specific option variable one by one utile find a free number.\r
 \r
   @param  VariableName          Indicate if the boot#### or driver#### option\r
 \r
@@ -204,7 +204,7 @@ BdsLibGetFreeOptionNumber (
     if (OptionBuffer == NULL) {\r
       break;\r
     }\r
-    Index ++;\r
+    Index++;\r
   } while (TRUE);\r
 \r
   return ((UINT16) Index);\r
@@ -508,11 +508,16 @@ BdsLibVariableToOption (
 \r
   Option->Signature   = BDS_LOAD_OPTION_SIGNATURE;\r
   Option->DevicePath  = AllocateZeroPool (GetDevicePathSize (DevicePath));\r
+  ASSERT(Option->DevicePath != NULL);\r
   CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath));\r
+\r
   Option->Attribute   = Attribute;\r
   Option->Description = AllocateZeroPool (StrSize (Description));\r
+  ASSERT(Option->Description != NULL);\r
   CopyMem (Option->Description, Description, StrSize (Description));\r
+\r
   Option->LoadOptions = AllocateZeroPool (LoadOptionsSize);\r
+  ASSERT(Option->LoadOptions != NULL);\r
   CopyMem (Option->LoadOptions, LoadOptions, LoadOptionsSize);\r
   Option->LoadOptionsSize = LoadOptionsSize;\r
 \r
@@ -827,7 +832,8 @@ BdsLibOutputStrings (
       break;\r
     }\r
   }\r
-\r
+  \r
+  VA_END(Args);\r
   return Status;\r
 }\r
 \r