summaryrefslogtreecommitdiff
path: root/PerformancePkg/Dp_App/Dp.c
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-06-15 13:38:35 +0800
committerStar Zeng <star.zeng@intel.com>2016-06-21 12:46:25 +0800
commit23cfa2b9f0d08d744ec66b05140129464bf12ef9 (patch)
treec21b164906c00445ee6960f1e546c0b440096fca /PerformancePkg/Dp_App/Dp.c
parentb9679cd7458110573dd4614148433312b61a1e26 (diff)
downloadedk2-platforms-23cfa2b9f0d08d744ec66b05140129464bf12ef9.tar.xz
PerformancePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@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>
Diffstat (limited to 'PerformancePkg/Dp_App/Dp.c')
-rw-r--r--PerformancePkg/Dp_App/Dp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/PerformancePkg/Dp_App/Dp.c b/PerformancePkg/Dp_App/Dp.c
index 6d980e5c55..6890a99c29 100644
--- a/PerformancePkg/Dp_App/Dp.c
+++ b/PerformancePkg/Dp_App/Dp.c
@@ -221,6 +221,7 @@ InitializeDp (
BOOLEAN CumulativeMode;
CONST CHAR16 *CustomCumulativeToken;
PERF_CUM_DATA *CustomCumulativeData;
+ UINTN NameSize;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
EFI_STRING StringDpOptionQh;
@@ -392,8 +393,9 @@ InitializeDp (
CustomCumulativeData->MaxDur = 0;
CustomCumulativeData->Count = 0;
CustomCumulativeData->Duration = 0;
- CustomCumulativeData->Name = AllocateZeroPool (StrLen (CustomCumulativeToken) + 1);
- UnicodeStrToAsciiStr (CustomCumulativeToken, CustomCumulativeData->Name);
+ NameSize = StrLen (CustomCumulativeToken) + 1;
+ CustomCumulativeData->Name = AllocateZeroPool (NameSize);
+ UnicodeStrToAsciiStrS (CustomCumulativeToken, CustomCumulativeData->Name, NameSize);
}
/****************************************************************************