diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-26 02:00:30 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-26 02:00:30 +0000 |
commit | 8d3000031dfc8b1d529e97d4471782bf636a84bf (patch) | |
tree | 44de59bd82468770e1117ba9e8ac04846cd0ac30 /ShellPkg/Library/UefiHandleParsingLib | |
parent | e0192326ae23083b14c2502314dc3a4809528efa (diff) | |
download | edk2-platforms-8d3000031dfc8b1d529e97d4471782bf636a84bf.tar.xz |
Enhance code to more safely and follow coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13221 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiHandleParsingLib')
-rw-r--r-- | ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 6e44bcec75..400b24046c 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -203,12 +203,14 @@ PciRootBridgeIoDumpInformation( }
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_PH), NULL);
+ ASSERT (Temp != NULL);
Temp2 = CatSPrint(L"\r\n", Temp, PciRootBridgeIo->ParentHandle);
FreePool(Temp);
RetVal = Temp2;
Temp2 = NULL;
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_SEG), NULL);
+ ASSERT (Temp != NULL);
Temp2 = CatSPrint(RetVal, Temp, PciRootBridgeIo->SegmentNumber);
FreePool(Temp);
FreePool(RetVal);
@@ -220,6 +222,7 @@ PciRootBridgeIoDumpInformation( Status = PciRootBridgeIo->GetAttributes (PciRootBridgeIo, &Supports, &Attributes);
if (!EFI_ERROR(Status)) {
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_ATT), NULL);
+ ASSERT (Temp != NULL);
Temp2 = CatSPrint(RetVal, Temp, Attributes);
FreePool(Temp);
FreePool(RetVal);
@@ -227,6 +230,7 @@ PciRootBridgeIoDumpInformation( Temp2 = NULL;
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_SUPPORTS), NULL);
+ ASSERT (Temp != NULL);
Temp2 = CatSPrint(RetVal, Temp, Supports);
FreePool(Temp);
FreePool(RetVal);
@@ -238,6 +242,7 @@ PciRootBridgeIoDumpInformation( Status = PciRootBridgeIo->Configuration (PciRootBridgeIo, (VOID **) &Configuration);
if (!EFI_ERROR(Status) && Configuration != NULL) {
Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_TITLE), NULL);
+ ASSERT (Temp != NULL);
Temp2 = CatSPrint(RetVal, Temp, Supports);
FreePool(Temp);
FreePool(RetVal);
|