diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-30 02:15:24 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-30 02:15:24 +0000 |
commit | 5540f4aa180a122bc4cce664390b9b8f5222521b (patch) | |
tree | eee5780d3fcbcaa1e12ebc9dc308070cf8a8a5c4 | |
parent | 184f7d83d71ad76e54cd42f3796024505c7da089 (diff) | |
download | edk2-platforms-5540f4aa180a122bc4cce664390b9b8f5222521b.tar.xz |
Should not use integer as boolean value for judgment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8684 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c index a0a22cc263..045cd1d83c 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c @@ -487,8 +487,8 @@ DevPathAtapi ( CatPrint (
Str,
L"Ata(%s,%s)",
- Atapi->PrimarySecondary ? L"Secondary" : L"Primary",
- Atapi->SlaveMaster ? L"Slave" : L"Master"
+ (Atapi->PrimarySecondary != 0)? L"Secondary" : L"Primary",
+ (Atapi->SlaveMaster != 0)? L"Slave" : L"Master"
);
}
@@ -679,7 +679,7 @@ DevPathSata ( SATA_DEVICE_PATH *Sata;
Sata = DevPath;
- if (Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) {
+ if ((Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) != 0) {
CatPrint (
Str,
L"Sata(%x,%x)",
@@ -1503,7 +1503,7 @@ DevicePathToStr ( // Find the handler to dump this device path node
//
DumpNode = NULL;
- for (Index = 0; DevPathTable[Index].Function; Index += 1) {
+ for (Index = 0; DevPathTable[Index].Function != NULL; Index += 1) {
if (DevicePathType (DevPathNode) == DevPathTable[Index].Type &&
DevicePathSubType (DevPathNode) == DevPathTable[Index].SubType
@@ -1521,7 +1521,7 @@ DevicePathToStr ( //
// Put a path seperator in if needed
//
- if (Str.Len && DumpNode != DevPathEndInstance) {
+ if ((Str.Len != 0) && (DumpNode != DevPathEndInstance)) {
CatPrint (&Str, L"/");
}
//
|