Discussion:
[edk2] [PATCH v2] MdePkg UefiLib: Code style alignment with IntelFrameworkPkg
Hao Wu
2015-07-10 01:23:05 UTC
Permalink
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) {
--
1.9.5.msysgit.0
Wu, Hao A
2015-07-10 01:26:08 UTC
Permalink
Sorry for the wrong version number of the patch, it's version 1.
-----Original Message-----
From: Wu, Hao A
Sent: Friday, July 10, 2015 9:23 AM
Cc: Wu, Hao A
Subject: [PATCH v2] MdePkg UefiLib: Code style alignment with
IntelFrameworkPkg
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
---
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
Loading...