]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Minor code enhancement.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 8 Jan 2010 04:10:38 +0000 (04:10 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 8 Jan 2010 04:10:38 +0000 (04:10 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9692 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c

index d5b5cfbbc78539cc6b31fc4b8c9fdb0cb16e7e37..03049180e78a85ade8b0e4f0609e8e5a972a5fc9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Serial driver for standard UARTS on an ISA bus.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -361,7 +361,7 @@ SerialControllerDriverStart (
 \r
     Status = EFI_ALREADY_STARTED;\r
     for (Index = 0; Index < EntryCount; Index++) {\r
-      if (OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) {\r
+      if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {\r
         Status = gBS->OpenProtocol (\r
                         OpenInfoBuffer[Index].ControllerHandle,\r
                         &gEfiSerialIoProtocolGuid,\r
index b38e68ab06c85a91004f4e9b89bfcf99db8898ff..669dcdb7b640516eb99192ad8de16a9bc30672df 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 # This file is used to build all modules in IntelFrameworkModulePkg.\r
 #\r
-# Copyright (c) 2007 - 2009, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation\r
 #\r
 # All rights reserved. This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
   gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0\r
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0xFFFB0000\r
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200\r
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8\r
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1\r
index 309bc60758270b6872f84698ae66d890e11a5e8d..7a9756e1f1d10dd2477e8e251cf8264ecc2ef414 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   BDS Lib functions which relate with create or process the boot option.\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -290,6 +290,7 @@ BdsLibBootViaBootOption (
       BufferSize = StrSize(BootStringNumber);\r
       BufferSize += StrSize(HiiString);\r
       Option->Description = AllocateZeroPool(BufferSize);\r
+      ASSERT (Option->Description != NULL);\r
       StrCpy (Option->Description, HiiString);\r
       if (StrnCmp (BootStringNumber, L"0", 1) != 0) {\r
         StrCat (Option->Description, L" ");\r
index 72dcb0e15e2b6711b4da5457896d84d0c1667c4f..ad9eb807de130fb7158a79371a29e7e3ba3ef43e 100644 (file)
@@ -5,7 +5,7 @@
 \r
   Boot option manipulation\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1052,6 +1052,7 @@ BOpt_GetBootOptions (
     \r
     if (HiiString != NULL) {\r
       NewLoadContext->Description = AllocateZeroPool(StringSize + StrSize(HiiString));\r
+      ASSERT (NewLoadContext->Description != NULL);\r
       StrCpy (NewLoadContext->Description, HiiString);\r
       if (StrnCmp ((UINT16*)LoadOptionPtr, L"0", 1) != 0) {\r
         StrCat (NewLoadContext->Description, L" ");\r
index fdd2befe82c2508e08171e6119b33c0647c2282c..74649f49cea7ced18b4502f669f704f617e0cac9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The platform boot manager reference implementation\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -316,6 +316,7 @@ CallBootManager (
       BufferSize = StrSize(BootStringNumber);\r
       BufferSize += StrSize(HiiString);\r
       Option->Description = AllocateZeroPool(BufferSize);\r
+      ASSERT (Option->Description != NULL);\r
       StrCpy (Option->Description, HiiString);\r
       if (StrnCmp (BootStringNumber, L"0", 1) != 0) {\r
         StrCat (Option->Description, L" ");\r
index 10a992a801c86604a7a7d053c2e6e2415eb700e3..6d78a68dd640511a755c67cfcffb9d6af5782bda 100644 (file)
@@ -27,7 +27,7 @@
   3) A support protocol is not found, and the data is not available to be read\r
      without it.  This results in EFI_PROTOCOL_ERROR.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1054,6 +1054,7 @@ FindChildNode (
         if (EFI_ERROR (Status)) {\r
           return Status;\r
         }\r
+        ASSERT (CurrentChildNode != NULL);\r
       } else {\r
         ASSERT (EFI_ERROR (ErrorStatus));\r
         return ErrorStatus;\r
@@ -1204,6 +1205,8 @@ GetSection (
     if (EFI_ERROR (Status)) {\r
       goto GetSection_Done;\r
     }\r
+    ASSERT (ChildNode != NULL);\r
+    ASSERT (ChildStreamNode != NULL);\r
     CopySize = ChildNode->Size - sizeof (EFI_COMMON_SECTION_HEADER);\r
     CopyBuffer = ChildStreamNode->StreamBuffer + ChildNode->OffsetInStream + sizeof (EFI_COMMON_SECTION_HEADER);\r
     *AuthenticationStatus = ExtractedAuthenticationStatus;\r