IntelFrameworkModulePkg: Replace [Ascii|Unicode]ValueToString
It is the follow up of commits 51f0ceb..9e32e97 to replace AsciiValueToString/UnicodeValueToString with AsciiValueToStringS/UnicodeValueToStringS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The platform device manager reference implementation
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -388,7 +388,14 @@ GetMacAddressString(
|
||||
//
|
||||
HwAddress = &MacAddressNode->MacAddress.Addr[0];
|
||||
for (Index = 0; Index < HwAddressSize; Index++) {
|
||||
String += UnicodeValueToString (String, PREFIX_ZERO | RADIX_HEX, *(HwAddress++), 2);
|
||||
UnicodeValueToStringS (
|
||||
String,
|
||||
BufferLen - ((UINTN)String - (UINTN)*PBuffer),
|
||||
PREFIX_ZERO | RADIX_HEX,
|
||||
*(HwAddress++),
|
||||
2
|
||||
);
|
||||
String += StrnLenS (String, (BufferLen - ((UINTN)String - (UINTN)*PBuffer)) / sizeof (CHAR16));
|
||||
if (Index < HwAddressSize - 1) {
|
||||
*String++ = L':';
|
||||
}
|
||||
@ -408,7 +415,14 @@ GetMacAddressString(
|
||||
|
||||
if (VlanId != 0) {
|
||||
*String++ = L'\\';
|
||||
String += UnicodeValueToString (String, PREFIX_ZERO | RADIX_HEX, VlanId, 4);
|
||||
UnicodeValueToStringS (
|
||||
String,
|
||||
BufferLen - ((UINTN)String - (UINTN)*PBuffer),
|
||||
PREFIX_ZERO | RADIX_HEX,
|
||||
VlanId,
|
||||
4
|
||||
);
|
||||
String += StrnLenS (String, (BufferLen - ((UINTN)String - (UINTN)*PBuffer)) / sizeof (CHAR16));
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user