]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePrintLib/PrintLib.c
Add Missing invocations to VA_END() for VA_START().
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BasePrintLib / PrintLib.c
index ecb55ebb2fdf9ed451155d5a2fd5d0b6e1aa4e44..3258b016b557b809c5d013dc2e7b84a79fcd4190 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -601,9 +601,12 @@ BasePrintLibSPrint (
   )\r
 {\r
   VA_LIST  Marker;\r
+  UINTN    NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
-  return BasePrintLibVSPrint (StartOfBuffer, BufferSize, Flags, FormatString, Marker);\r
+  NumberOfPrinted = BasePrintLibVSPrint (StartOfBuffer, BufferSize, Flags, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
@@ -696,9 +699,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
@@ -789,9 +795,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
@@ -933,9 +942,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
@@ -1026,9 +1038,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