]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
Remove the work-around in DevicePathLib to judge the end of device path node type.
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLibDevicePathProtocol / UefiDevicePathLib.c
index 08a0191c14fd0a76bf2a4e0ec9cca2f7c3c786d0..25fcc8293c12712dc2b7def8ec566f6bcfce67c0 100644 (file)
@@ -182,7 +182,7 @@ IsDevicePathEndType (
   )\r
 {\r
   ASSERT (Node != NULL);\r
-  return (BOOLEAN) ((DevicePathType (Node) & 0x7f) == END_DEVICE_PATH_TYPE);\r
+  return (BOOLEAN) (DevicePathType (Node)) == END_DEVICE_PATH_TYPE);\r
 }\r
 \r
 /**\r
@@ -250,13 +250,13 @@ IsDevicePathEndInstance (
 **/\r
 UINT16\r
 SetDevicePathNodeLength (\r
-  IN VOID   *Node,\r
-  IN UINTN  NodeLength\r
+  IN OUT VOID  *Node,\r
+  IN UINTN     Length\r
   )\r
 {\r
   ASSERT (Node != NULL);\r
-  ASSERT (NodeLength < 0x10000);\r
-  return WriteUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0], (UINT16)(NodeLength));\r
+  ASSERT (Length < 0x10000);\r
+  return WriteUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0], (UINT16)(Length));\r
 }\r
 \r
 /**\r
@@ -277,7 +277,7 @@ SetDevicePathNodeLength (
 **/\r
 VOID\r
 SetDevicePathEndNode (\r
-  IN VOID  *Node\r
+  OUT VOID  *Node\r
   )\r
 {\r
   ASSERT (Node != NULL);\r