]> git.proxmox.com Git - mirror_edk2.git/commitdiff
use UnicodeVSPrintAsciiFormat, UnicodeSPrintAsciiFormat to simplify code.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 8 Sep 2008 09:08:26 +0000 (09:08 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 8 Sep 2008 09:08:26 +0000 (09:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5844 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/UefiDebugLibStdErr/DebugLib.c

index 217f164de5d6d386a5ef9b7cb3441ff4687fb4aa..82fd78ab4f56640d1ad658f647f417af3f02f87a 100644 (file)
@@ -53,7 +53,6 @@ DebugPrint (
   )\r
 {\r
   CHAR16   Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-  CHAR8    AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
   VA_LIST  Marker;\r
 \r
   //\r
@@ -72,8 +71,7 @@ DebugPrint (
   // Convert the DEBUG() message to a Unicode String\r
   //\r
   VA_START (Marker, Format);\r
-  AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);\r
-  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
+  UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, Marker);\r
   VA_END (Marker);\r
 \r
   //\r
@@ -117,14 +115,19 @@ DebugAssert (
   )\r
 {\r
   CHAR16  Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-  CHAR8   AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
 \r
   //\r
   // Generate the ASSERT() message in Unicode format\r
   //\r
-  AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);\r
-  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
-\r
+  UnicodeSPrintAsciiFormat (\r
+    Buffer, \r
+    MAX_DEBUG_MESSAGE_LENGTH,\r
+    "ASSERT %a(%d): %a\n", \r
+    FileName, \r
+    LineNumber, \r
+    Description\r
+    );\r
+    \r
   //\r
   // Send the print string to the Standard Error device\r
   //\r