MdeModulePkg/PciBus: Change switch-case to if-else to fix EBC build

EBC compiler doesn't treat EFI_xxx as constant due to these macros
are UINT64 type in 64bit env and UINT32 type in 32bit env.
So it reports error when "case EFI_xxx" is used.
The patch changes to use if-else to fix EBC build failure.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Ruiyu Ni 2018-01-09 13:52:47 +08:00
parent 3143144ba5
commit ada385843b

View File

@ -1154,19 +1154,13 @@ PciScanBus (
FreePool (Descriptors); FreePool (Descriptors);
switch (Status) { if (!EFI_ERROR (Status)) {
case EFI_SUCCESS: BusPadding = TRUE;
BusPadding = TRUE; } else if (Status != EFI_NOT_FOUND) {
break; //
// EFI_NOT_FOUND is not a real error. It indicates no bus number padding requested.
case EFI_NOT_FOUND: //
// return Status;
// no bus number padding requested
//
break;
default:
return Status;
} }
} }
} }