ShellPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a32
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
Star Zeng
2016-06-15 13:39:13 +08:00
parent b7c7179338
commit 46213c8eb4
3 changed files with 14 additions and 12 deletions

View File

@@ -220,8 +220,8 @@ DumpAllTrace(
++Count; // Count the number of records printed
// If Handle is non-zero, see if we can determine a name for the driver
AsciiStrToUnicodeStr (Measurement.Module, mGaugeString); // Use Module by default
AsciiStrToUnicodeStr (Measurement.Token, mUnicodeToken);
AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, sizeof (mGaugeString) / sizeof (mGaugeString[0])); // Use Module by default
AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUnicodeToken) / sizeof (mUnicodeToken[0]));
if (Measurement.Handle != NULL) {
// See if the Handle is in the HandleBuffer
for (TIndex = 0; TIndex < HandleCount; TIndex++) {
@@ -595,7 +595,7 @@ ProcessHandles(
continue;
}
mGaugeString[0] = 0; // Empty driver name by default
AsciiStrToUnicodeStr (Measurement.Token, mUnicodeToken);
AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUnicodeToken) / sizeof (mUnicodeToken[0]));
// See if the Handle is in the HandleBuffer
for (Index = 0; Index < HandleCount; Index++) {
if (Measurement.Handle == HandleBuffer[Index]) {
@@ -776,8 +776,8 @@ ProcessGlobal(
&Measurement.EndTimeStamp,
&Measurement.Identifier)) != 0)
{
AsciiStrToUnicodeStr (Measurement.Module, mGaugeString);
AsciiStrToUnicodeStr (Measurement.Token, mUnicodeToken);
AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, sizeof (mGaugeString) / sizeof (mGaugeString[0]));
AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUnicodeToken) / sizeof (mUnicodeToken[0]));
mGaugeString[25] = 0;
mUnicodeToken[31] = 0;
if ( ! ( IsPhase( &Measurement) ||