ShellPkg/pci: Fix VS2012 build failure

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
This commit is contained in:
Ruiyu Ni 2017-04-20 10:17:16 +08:00
parent a32c1a5b1c
commit f1894fa294
1 changed files with 2 additions and 1 deletions

View File

@ -2885,6 +2885,7 @@ ShellCommandRunPci (
);
ExtendedConfigSpace = NULL;
ExtendedConfigSize = 0;
PcieCapabilityPtr = LocatePciCapability (&ConfigSpace, EFI_PCI_CAPABILITY_ID_PCIEXP);
if (PcieCapabilityPtr != 0) {
ExtendedConfigSize = 0x1000 - EFI_PCIE_CAPABILITY_BASE_OFFSET;
@ -2922,7 +2923,7 @@ ShellCommandRunPci (
//
if (ExplainData) {
PciExplainPci (&ConfigSpace, Address, IoDev);
if ((PcieCapabilityPtr != 0) && !ShellGetExecutionBreakFlag ()) {
if ((ExtendedConfigSpace != NULL) && !ShellGetExecutionBreakFlag ()) {
PciExplainPciExpress (
(PCI_CAPABILITY_PCIEXP *) ((UINT8 *) &ConfigSpace + PcieCapabilityPtr),
ExtendedConfigSpace,