]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Should not use integer as boolean value for judgment.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 30 Jun 2009 02:15:24 +0000 (02:15 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 30 Jun 2009 02:15:24 +0000 (02:15 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8684 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Library/GenericBdsLib/DevicePath.c

index a0a22cc263a36ada32d38b4b935634cae6f5af50..045cd1d83c114f309a5df45c047836fad7fb7755 100644 (file)
@@ -487,8 +487,8 @@ DevPathAtapi (
   CatPrint (\r
     Str,\r
     L"Ata(%s,%s)",\r
-    Atapi->PrimarySecondary ? L"Secondary" : L"Primary",\r
-    Atapi->SlaveMaster ? L"Slave" : L"Master"\r
+    (Atapi->PrimarySecondary != 0)? L"Secondary" : L"Primary",\r
+    (Atapi->SlaveMaster != 0)? L"Slave" : L"Master"\r
     );\r
 }\r
 \r
@@ -679,7 +679,7 @@ DevPathSata (
   SATA_DEVICE_PATH *Sata;\r
 \r
   Sata = DevPath;\r
-  if (Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) {\r
+  if ((Sata->PortMultiplierPortNumber & SATA_HBA_DIRECT_CONNECT_FLAG) != 0) {\r
     CatPrint (\r
       Str,\r
       L"Sata(%x,%x)",\r
@@ -1503,7 +1503,7 @@ DevicePathToStr (
     // Find the handler to dump this device path node\r
     //\r
     DumpNode = NULL;\r
-    for (Index = 0; DevPathTable[Index].Function; Index += 1) {\r
+    for (Index = 0; DevPathTable[Index].Function != NULL; Index += 1) {\r
 \r
       if (DevicePathType (DevPathNode) == DevPathTable[Index].Type &&\r
           DevicePathSubType (DevPathNode) == DevPathTable[Index].SubType\r
@@ -1521,7 +1521,7 @@ DevicePathToStr (
     //\r
     //  Put a path seperator in if needed\r
     //\r
-    if (Str.Len && DumpNode != DevPathEndInstance) {\r
+    if ((Str.Len != 0) && (DumpNode != DevPathEndInstance)) {\r
       CatPrint (&Str, L"/");\r
     }\r
     //\r