]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
Add Missing invocations to VA_END() for VA_START().
[mirror_edk2.git] / MdeModulePkg / Library / DxePrintLibPrint2Protocol / PrintLib.c
index 3b4d4e03adb26c5c105d5158229dd8f74daab088..c0750ad1767bb7559b3e4d2d1d757bc6beae35aa 100644 (file)
@@ -6,7 +6,7 @@
   protocol related to this implementation, not in the public spec. So, this \r
   library instance is only for this code base.\r
 \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 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
@@ -366,9 +366,12 @@ UnicodeSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
@@ -515,9 +518,12 @@ UnicodeSPrintAsciiFormat (
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
@@ -714,9 +720,12 @@ AsciiSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
@@ -863,9 +872,12 @@ AsciiSPrintUnicodeFormat (
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 \r
@@ -1056,9 +1068,12 @@ InternalPrintLibSPrint (
   )\r
 {\r
   VA_LIST  Marker;\r
+  UINTN    NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
-  return InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);\r
+  NumberOfPrinted = InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 #define WARNING_STATUS_NUMBER         4\r