]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
Add Missing invocations to VA_END() for VA_START().
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / PeiDxeDebugLibReportStatusCode / DebugLib.c
index 980255165dffcec0ec3d513564801e0fb654f1f0..f6ab54ed6a87d86697d7867ff17a40f195cad36f 100644 (file)
@@ -4,8 +4,8 @@
   Note that if the debug message length is larger than the maximum allowable\r
   record length, then the debug message will be ignored directly.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  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
   http://opensource.org/licenses/bsd-license.php\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
 #include <Library/PcdLib.h>\r
+#include <Library/DebugPrintErrorLevelLib.h>\r
 \r
 /**\r
   Prints a debug message to the debug output device if the specified error level is enabled.\r
 \r
-  If any bit in ErrorLevel is also set in PcdDebugPrintErrorLevel, then print \r
-  the message specified by Format and the associated variable argument list to \r
-  the debug output device.\r
+  If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function \r
+  GetDebugPrintErrorLevel (), then print the message specified by Format and the \r
+  associated variable argument list to the debug output device.\r
 \r
   If Format is NULL, then ASSERT().\r
 \r
@@ -68,7 +69,7 @@ DebugPrint (
   //\r
   // Check driver Debug Level value and global debug level\r
   //\r
-  if ((ErrorLevel & PcdGet32 (PcdDebugPrintErrorLevel)) == 0) {\r
+  if ((ErrorLevel & GetDebugPrintErrorLevel ()) == 0) {\r
     return;\r
   }\r
 \r
@@ -206,6 +207,7 @@ DebugPrint (
     // If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then return\r
     //\r
     if ((CHAR8 *)BaseListMarker > FormatString) {\r
+      VA_END (VaListMarker);\r
       return;\r
     }\r
   }\r