Hao Wu
2015-07-10 01:23:05 UTC
MdePkg/Library/UefiLib/UefiLibPrint.c is modified to keep code style
consistency with IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <***@intel.com>
---
MdePkg/Library/UefiLib/UefiLibPrint.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c
index 91ce492..430da97 100644
--- a/MdePkg/Library/UefiLib/UefiLibPrint.c
+++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
@@ -754,10 +754,12 @@ CatVSPrint (
SizeRequired = sizeof(CHAR16) + (CharactersRequired * sizeof(CHAR16));
}
- BufferToReturn = AllocateZeroPool(SizeRequired);
+ BufferToReturn = AllocatePool(SizeRequired);
if (BufferToReturn == NULL) {
return NULL;
+ } else {
+ BufferToReturn[0] = L'\0';
}
if (String != NULL) {
consistency with IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <***@intel.com>
---
MdePkg/Library/UefiLib/UefiLibPrint.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c
index 91ce492..430da97 100644
--- a/MdePkg/Library/UefiLib/UefiLibPrint.c
+++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
@@ -754,10 +754,12 @@ CatVSPrint (
SizeRequired = sizeof(CHAR16) + (CharactersRequired * sizeof(CHAR16));
}
- BufferToReturn = AllocateZeroPool(SizeRequired);
+ BufferToReturn = AllocatePool(SizeRequired);
if (BufferToReturn == NULL) {
return NULL;
+ } else {
+ BufferToReturn[0] = L'\0';
}
if (String != NULL) {
--
1.9.5.msysgit.0
1.9.5.msysgit.0