From 5540f4aa180a122bc4cce664390b9b8f5222521b Mon Sep 17 00:00:00 2001 From: klu2 Date: Tue, 30 Jun 2009 02:15:24 +0000 Subject: 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 --- IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'IntelFrameworkModulePkg/Library') 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"/"); } // -- cgit v1.2.3