mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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:
parent
3143144ba5
commit
ada385843b
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user