summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiDebugLibStdErr
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-08 09:08:26 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-08 09:08:26 +0000
commit6cff95cd69859753f6ef7af542bdb3e0714df99d (patch)
treea96d3f8581c02d07abbf9c5fc5459b326bca65f5 /MdePkg/Library/UefiDebugLibStdErr
parent7c6d32a5648dce51ee0339221b026ea3f6c10b4d (diff)
downloadedk2-platforms-6cff95cd69859753f6ef7af542bdb3e0714df99d.tar.xz
use UnicodeVSPrintAsciiFormat, UnicodeSPrintAsciiFormat to simplify code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5844 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiDebugLibStdErr')
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/DebugLib.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
index 217f164de5..82fd78ab4f 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
@@ -53,7 +53,6 @@ DebugPrint (
)
{
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
- CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
VA_LIST Marker;
//
@@ -72,8 +71,7 @@ DebugPrint (
// Convert the DEBUG() message to a Unicode String
//
VA_START (Marker, Format);
- AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);
- AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
+ UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, Marker);
VA_END (Marker);
//
@@ -117,14 +115,19 @@ DebugAssert (
)
{
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
- CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
//
// Generate the ASSERT() message in Unicode format
//
- AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);
- AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
-
+ UnicodeSPrintAsciiFormat (
+ Buffer,
+ MAX_DEBUG_MESSAGE_LENGTH,
+ "ASSERT %a(%d): %a\n",
+ FileName,
+ LineNumber,
+ Description
+ );
+
//
// Send the print string to the Standard Error device
//