]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Coding style checked
authorjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 6 Feb 2009 05:48:16 +0000 (05:48 +0000)
committerjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 6 Feb 2009 05:48:16 +0000 (05:48 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7458 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c

index f7e7cdfcfb612cb3daa22a0fd0345940f17e7abe..4dbd49b7e4d3fbb5284d00845dcbfdf89fd3544c 100644 (file)
@@ -2765,7 +2765,7 @@ ConvertTextToDeviceNode (
   DeviceNodeStr = StrDuplicate (TextDeviceNode);\r
   ASSERT (DeviceNodeStr != NULL);\r
 \r
-  for (Index = 0; DevPathFromTextTable[Index].Function; Index++) {\r
+  for (Index = 0; DevPathFromTextTable[Index].Function != NULL; Index++) {\r
     ParamStr = GetParamByNodeName (DeviceNodeStr, DevPathFromTextTable[Index].DevicePathNodeText);\r
     if (ParamStr != NULL) {\r
       DumpNode = DevPathFromTextTable[Index].Function;\r
@@ -2833,7 +2833,7 @@ ConvertTextToDevicePath (
   Str                 = DevicePathStr;\r
   while ((DeviceNodeStr = GetNextDeviceNodeStr (&Str, &IsInstanceEnd)) != NULL) {\r
     DumpNode = NULL;\r
-    for (Index = 0; DevPathFromTextTable[Index].Function; Index++) {\r
+    for (Index = 0; DevPathFromTextTable[Index].Function != NULL; Index++) {\r
       ParamStr = GetParamByNodeName (DeviceNodeStr, DevPathFromTextTable[Index].DevicePathNodeText);\r
       if (ParamStr != NULL) {\r
         DumpNode = DevPathFromTextTable[Index].Function;\r
index d45c267ffbbcfe5c9387c0444bc5820e66032d85..56bd44a76abf789f0040b093038c1c63c255ae58 100644 (file)
@@ -555,8 +555,8 @@ DevPathToTextAtapi (
     CatPrint (\r
       Str,\r
       L"Ata(%s,%s,0x%x)",\r
-      Atapi->PrimarySecondary ? L"Secondary" : L"Primary",\r
-      Atapi->SlaveMaster ? L"Slave" : L"Master",\r
+      (Atapi->PrimarySecondary == 1) ? L"Secondary" : L"Primary",\r
+      (Atapi->SlaveMaster == 1) ? L"Slave" : L"Master",\r
       Atapi->Lun\r
       );\r
   }\r
@@ -1030,8 +1030,8 @@ DevPathToTextIPv4 (
     IPDevPath->RemoteIpAddress.Addr[1],\r
     IPDevPath->RemoteIpAddress.Addr[2],\r
     IPDevPath->RemoteIpAddress.Addr[3],\r
-    IPDevPath->Protocol ? L"TCP" : L"UDP",\r
-    (IPDevPath->StaticIpAddress == TRUE) ? L"Static" : L"DHCP",\r
+    (IPDevPath->Protocol == 1) ? L"TCP" : L"UDP",\r
+    IPDevPath->StaticIpAddress ? L"Static" : L"DHCP",\r
     IPDevPath->LocalIpAddress.Addr[0],\r
     IPDevPath->LocalIpAddress.Addr[1],\r
     IPDevPath->LocalIpAddress.Addr[2],\r
@@ -1106,8 +1106,8 @@ DevPathToTextIPv6 (
     IPDevPath->RemoteIpAddress.Addr[13],\r
     IPDevPath->RemoteIpAddress.Addr[14],\r
     IPDevPath->RemoteIpAddress.Addr[15],\r
-    IPDevPath->Protocol ? L"TCP" : L"UDP",\r
-    (IPDevPath->StaticIpAddress == TRUE) ? L"Static" : L"DHCP",\r
+    (IPDevPath->Protocol == 1) ? L"TCP" : L"UDP",\r
+    IPDevPath->StaticIpAddress ? L"Static" : L"DHCP",\r
     IPDevPath->LocalIpAddress.Addr[0],\r
     IPDevPath->LocalIpAddress.Addr[1],\r
     IPDevPath->LocalIpAddress.Addr[2],\r
@@ -1769,7 +1769,7 @@ ConvertDevicePathToText (
     // Find the handler to dump this device path node\r
     //\r
     DumpNode = NULL;\r
-    for (Index = 0; DevPathToTextTable[Index].Function; Index += 1) {\r
+    for (Index = 0; DevPathToTextTable[Index].Function != NULL; Index += 1) {\r
 \r
       if (DevicePathType (DevPathNode) == DevPathToTextTable[Index].Type &&\r
           DevicePathSubType (DevPathNode) == DevPathToTextTable[Index].SubType\r