/* If Node is NULL, then ASSERT(). If NodeLength >= SIZE_64KB, then ASSERT(). If NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL), then ASSERT(). */
UINT16 SetDevicePathNodeLength(VOID *Node, UINTN Length)
/* If Node is NULL, then ASSERT(). If NodeLength >= SIZE_64KB, then ASSERT(). If NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL), then ASSERT(). */
UINT16 SetDevicePathNodeLength(VOID *Node, UINTN Length)
{
  ASSERT (Node != NULL);
  ASSERT ((Length >= sizeof (EFI_DEVICE_PATH_PROTOCOL)) && (Length < SIZE_64KB));
  return WriteUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0], (UINT16)(Length));
}